1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

private mode page with message

This commit is contained in:
Kyle Spearrin
2017-09-09 15:41:49 -04:00
parent ac00d1f106
commit 60d75ce5fe
10 changed files with 133 additions and 79 deletions

View File

@@ -11,6 +11,12 @@
$urlRouterProvider.otherwise(function ($injector, $location) {
var $state = $injector.get('$state');
if (!chrome.extension.getBackgroundPage()) {
$state.go('privateMode');
return;
}
var userService = $injector.get('userService');
var cryptoService = $injector.get('cryptoService');
@@ -34,14 +40,21 @@
$stateProvider
.state('splash', {
url: '/splash',
controller: 'splashController',
controller: 'baseController',
templateUrl: 'app/global/splash.html',
data: { authorize: false },
params: { animation: null }
})
.state('privateMode', {
url: '/private-mode',
controller: 'privateModeController',
templateUrl: 'app/global/privateMode.html',
data: { authorize: false },
params: { animation: null }
})
.state('home', {
url: '/home',
controller: 'homeController',
controller: 'baseController',
templateUrl: 'app/global/home.html',
data: { authorize: false },
params: { animation: null }
@@ -248,6 +261,10 @@
stateService.purgeState();
}
if (!userService) {
return;
}
userService.isAuthenticated(function (isAuthenticated) {
if (isAuthenticated) {
var obj = {};