1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

setup various pages and services

This commit is contained in:
Kyle Spearrin
2016-09-03 00:03:13 -04:00
parent 8fafe2bd6d
commit e322c77725
33 changed files with 425 additions and 244 deletions

View File

@@ -0,0 +1,23 @@
angular
.module('bit.accounts')
.controller('accountsLoginController', function ($scope, $state, loginService, userService) {
$scope.login = function (model) {
$scope.loginPromise = loginService.logIn(model.email, model.masterPassword);
$scope.loginPromise.then(function () {
userService.getUserProfile(function (profile) {
if (profile.twoFactor) {
$state.go('login.twoFactor');
}
else {
$state.go('tabs.current');
}
});
});
};
$scope.twoFactor = function (model) {
$state.go('tabs.current');
};
});