From d0ca428d901ad1c491c98dc7bf1c1bd27ca52f3b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 17 Sep 2016 18:27:36 -0400 Subject: [PATCH] setup and stub out password generator page --- src/popup/app/config.js | 52 ++++++++------ src/popup/app/current/currentController.js | 2 + .../tools/toolsPasswordGeneratorController.js | 6 ++ src/popup/app/tools/views/tools.html | 2 +- .../tools/views/toolsPasswordGenerator.html | 72 +++++++++++++++++++ src/popup/app/vault/views/vaultAddSite.html | 10 +-- src/popup/app/vault/views/vaultEditSite.html | 10 +-- src/popup/index.html | 1 + src/popup/less/components.less | 18 ++++- 9 files changed, 138 insertions(+), 35 deletions(-) create mode 100644 src/popup/app/tools/toolsPasswordGeneratorController.js create mode 100644 src/popup/app/tools/views/toolsPasswordGenerator.html diff --git a/src/popup/app/config.js b/src/popup/app/config.js index 0a3e36c79a..d7dfe4f5d4 100644 --- a/src/popup/app/config.js +++ b/src/popup/app/config.js @@ -28,75 +28,83 @@ $httpProvider.interceptors.push('jwtInterceptor'); $urlRouterProvider.otherwise(function ($injector, $location) { - var $state = $injector.get("$state"); - $state.go("login"); + var $state = $injector.get('$state'); + $state.go('login'); }); $stateProvider .state('login', { - url: "/login", + url: '/login', controller: 'accountsLoginController', - templateUrl: "app/accounts/views/accountsLogin.html", + templateUrl: 'app/accounts/views/accountsLogin.html', data: { authorize: false }, params: { animation: null } }) .state('twoFactor', { - url: "/two-factor", + url: '/two-factor', controller: 'accountsLoginController', - templateUrl: "app/accounts/views/accountsLoginTwoFactor.html", + templateUrl: 'app/accounts/views/accountsLoginTwoFactor.html', data: { authorize: false }, params: { animation: null } }) .state('tabs', { - url: "/tab", + url: '/tab', abstract: true, - templateUrl: "app/global/tabs.html", + templateUrl: 'app/global/tabs.html', data: { authorize: true }, params: { animation: null } }) .state('tabs.current', { - url: "/current", - templateUrl: "app/current/views/current.html", + url: '/current', + templateUrl: 'app/current/views/current.html', controller: 'currentController' }) .state('tabs.vault', { - url: "/vault", - templateUrl: "app/vault/views/vault.html", + url: '/vault', + templateUrl: 'app/vault/views/vault.html', controller: 'vaultController', params: { scrollY: 0, searchText: null } }) .state('tabs.settings', { - url: "/settings", - templateUrl: "app/settings/views/settings.html", + url: '/settings', + templateUrl: 'app/settings/views/settings.html', controller: 'settingsController' }) .state('tabs.tools', { - url: "/tools", - templateUrl: "app/tools/views/tools.html", + url: '/tools', + templateUrl: 'app/tools/views/tools.html', controller: 'toolsController' }) .state('viewSite', { - url: "/view-site?siteId", - templateUrl: "app/vault/views/vaultViewSite.html", + url: '/view-site?siteId', + templateUrl: 'app/vault/views/vaultViewSite.html', controller: 'vaultViewSiteController', data: { authorize: true }, params: { animation: null, returnScrollY: 0, returnSearchText: null } }) .state('addSite', { - url: "/add-site", - templateUrl: "app/vault/views/vaultAddSite.html", + url: '/add-site', + templateUrl: 'app/vault/views/vaultAddSite.html', controller: 'vaultAddSiteController', data: { authorize: true }, params: { animation: null, returnScrollY: 0, returnSearchText: null, name: null, uri: null } }) .state('editSite', { - url: "/edit-site?siteId", - templateUrl: "app/vault/views/vaultEditSite.html", + url: '/edit-site?siteId', + templateUrl: 'app/vault/views/vaultEditSite.html', controller: 'vaultEditSiteController', data: { authorize: true }, params: { animation: null, fromView: true, returnScrollY: 0, returnSearchText: null } + }) + + .state('passwordGenerator', { + url: '/password-generator', + templateUrl: 'app/tools/views/toolsPasswordGenerator.html', + controller: 'toolsPasswordGeneratorController', + data: { authorize: true }, + params: { animation: null, fromAdd: false, fromEdit: null } }); }) .run(function ($rootScope, userService, loginService, tokenService, $state) { diff --git a/src/popup/app/current/currentController.js b/src/popup/app/current/currentController.js index f06295952d..1774349caf 100644 --- a/src/popup/app/current/currentController.js +++ b/src/popup/app/current/currentController.js @@ -16,12 +16,14 @@ angular tabId = tabs[0].id; } else { + $scope.loaded = true; return; } domain = tldjs.getDomain(url); $scope.sites = []; if (!domain) { + $scope.loaded = true; return; } diff --git a/src/popup/app/tools/toolsPasswordGeneratorController.js b/src/popup/app/tools/toolsPasswordGeneratorController.js new file mode 100644 index 0000000000..6f618f3c03 --- /dev/null +++ b/src/popup/app/tools/toolsPasswordGeneratorController.js @@ -0,0 +1,6 @@ +angular + .module('bit.tools') + + .controller('toolsPasswordGeneratorController', function ($scope, $state, $stateParams) { + popupUtils.initListSectionItemListeners(); + }); diff --git a/src/popup/app/tools/views/tools.html b/src/popup/app/tools/views/tools.html index 2b35fb35b6..a97f014d43 100644 --- a/src/popup/app/tools/views/tools.html +++ b/src/popup/app/tools/views/tools.html @@ -5,7 +5,7 @@
- + Password Generator Automatically generate strong, unique passwords for your logins. diff --git a/src/popup/app/tools/views/toolsPasswordGenerator.html b/src/popup/app/tools/views/toolsPasswordGenerator.html new file mode 100644 index 0000000000..8c99571154 --- /dev/null +++ b/src/popup/app/tools/views/toolsPasswordGenerator.html @@ -0,0 +1,72 @@ +
+ +
+ Select +
+
Generate Password
+
+
+
+ *&Houhdasdy87 +
+
+ +
+
+ Options +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
diff --git a/src/popup/app/vault/views/vaultAddSite.html b/src/popup/app/vault/views/vaultAddSite.html index 50e0da8b23..443b2fce5a 100644 --- a/src/popup/app/vault/views/vaultAddSite.html +++ b/src/popup/app/vault/views/vaultAddSite.html @@ -17,19 +17,19 @@
- +
- +
- +
- +
@@ -41,7 +41,7 @@