From 492e2e693cb7d596d489cf23a15768e6ab9ce543 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 1 Mar 2017 22:47:24 -0500 Subject: [PATCH] setup new organization layout within backend --- src/app/accounts/accountsLoginController.js | 4 +- src/app/app.js | 3 +- src/app/config.js | 28 +++- src/app/global/mainController.js | 2 +- .../organizationDashboardController.js | 6 + src/app/organization/organizationModule.js | 2 + src/app/organization/views/dashboard.html | 16 ++ src/app/tools/toolsImportController.js | 2 +- src/app/views/backendLayout.html | 151 +----------------- src/app/views/organizationLayout.html | 40 +++++ src/app/views/userLayout.html | 150 +++++++++++++++++ src/index.html | 4 +- 12 files changed, 245 insertions(+), 163 deletions(-) create mode 100644 src/app/organization/organizationDashboardController.js create mode 100644 src/app/organization/organizationModule.js create mode 100644 src/app/organization/views/dashboard.html create mode 100644 src/app/views/organizationLayout.html create mode 100644 src/app/views/userLayout.html diff --git a/src/app/accounts/accountsLoginController.js b/src/app/accounts/accountsLoginController.js index 73379344c5..434b1d7726 100644 --- a/src/app/accounts/accountsLoginController.js +++ b/src/app/accounts/accountsLoginController.js @@ -40,7 +40,7 @@ angular } else { $analytics.eventTrack('Logged In'); - $state.go('backend.vault'); + $state.go('backend.user.vault'); } }); }; @@ -51,7 +51,7 @@ angular $scope.twoFactorPromise.then(function () { $analytics.eventTrack('Logged In From Two-step'); - $state.go('backend.vault'); + $state.go('backend.user.vault'); }); }; }); diff --git a/src/app/app.js b/src/app/app.js index 611fbdad7a..45492bc59b 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -17,5 +17,6 @@ 'bit.vault', 'bit.shared', 'bit.settings', - 'bit.tools' + 'bit.tools', + 'bit.organization' ]); diff --git a/src/app/config.js b/src/app/config.js index b65630afcd..726b108eea 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -75,42 +75,56 @@ angular authorize: true } }) - .state('backend.vault', { + .state('backend.user', { + templateUrl: 'app/views/userLayout.html', + abstract: true + }) + .state('backend.user.vault', { url: '^/vault', templateUrl: 'app/vault/views/vault.html', controller: 'vaultController', data: { pageTitle: 'My Vault' } }) - .state('backend.settings', { + .state('backend.user.settings', { url: '^/settings', templateUrl: 'app/settings/views/settings.html', controller: 'settingsController', data: { pageTitle: 'Settings' } }) - .state('backend.settingsDomains', { + .state('backend.user.settingsDomains', { url: '^/settings/domains', templateUrl: 'app/settings/views/settingsDomains.html', controller: 'settingsDomainsController', data: { pageTitle: 'Domain Settings' } }) - .state('backend.tools', { + .state('backend.user.tools', { url: '^/tools', templateUrl: 'app/tools/views/tools.html', controller: 'toolsController', data: { pageTitle: 'Tools' } }) - .state('backend.shared', { + .state('backend.user.shared', { url: '^/shared', templateUrl: 'app/shared/views/shared.html', controller: 'sharedController', data: { pageTitle: 'Shared' } }) - .state('backend.sharedMe', { + .state('backend.user.sharedMe', { url: '^/shared/me', templateUrl: 'app/shared/views/sharedMe.html', controller: 'sharedMeController', data: { pageTitle: 'Shared with Me' } }) + .state('backend.org', { + templateUrl: 'app/views/organizationLayout.html', + abstract: true + }) + .state('backend.org.dashboard', { + url: '^/organization', + templateUrl: 'app/organization/views/dashboard.html', + controller: 'organizationDashboardController', + data: { pageTitle: 'Org Dash' } + }) // Frontend .state('frontend', { @@ -182,7 +196,7 @@ angular if (!toState.data || !toState.data.authorize) { if (authService.isAuthenticated()) { event.preventDefault(); - $state.go('backend.vault'); + $state.go('backend.user.vault'); } return; diff --git a/src/app/global/mainController.js b/src/app/global/mainController.js index 33932b6b64..31c8fa2fb2 100644 --- a/src/app/global/mainController.js +++ b/src/app/global/mainController.js @@ -39,7 +39,7 @@ angular }); $scope.searchVault = function () { - $state.go('backend.vault'); + $state.go('backend.user.vault'); }; $scope.addLogin = function () { diff --git a/src/app/organization/organizationDashboardController.js b/src/app/organization/organizationDashboardController.js new file mode 100644 index 0000000000..2bf6cb1c39 --- /dev/null +++ b/src/app/organization/organizationDashboardController.js @@ -0,0 +1,6 @@ +angular + .module('bit.organization') + + .controller('organizationDashboardController', function ($scope) { + + }); diff --git a/src/app/organization/organizationModule.js b/src/app/organization/organizationModule.js new file mode 100644 index 0000000000..0880ae474f --- /dev/null +++ b/src/app/organization/organizationModule.js @@ -0,0 +1,2 @@ +angular + .module('bit.organization', ['ui.bootstrap']); diff --git a/src/app/organization/views/dashboard.html b/src/app/organization/views/dashboard.html new file mode 100644 index 0000000000..1300e98429 --- /dev/null +++ b/src/app/organization/views/dashboard.html @@ -0,0 +1,16 @@ +
+

+ Organization Dashboard + Some org +

+
+
+
+
+

My Org

+
+
+ Some data +
+
+
diff --git a/src/app/tools/toolsImportController.js b/src/app/tools/toolsImportController.js index 45104782b1..c101bda106 100644 --- a/src/app/tools/toolsImportController.js +++ b/src/app/tools/toolsImportController.js @@ -228,7 +228,7 @@ folderRelationships: folderRelationships }, function () { $uibModalInstance.dismiss('cancel'); - $state.go('backend.vault').then(function () { + $state.go('backend.user.vault').then(function () { $analytics.eventTrack('Imported Data', { label: $scope.model.source }); toastr.success('Data has been successfully imported into your vault.', 'Import Success'); }); diff --git a/src/app/views/backendLayout.html b/src/app/views/backendLayout.html index 8b48a76a51..cd076260db 100644 --- a/src/app/views/backendLayout.html +++ b/src/app/views/backendLayout.html @@ -1,154 +1,5 @@
-
- - -
- - - -
-
+