diff --git a/assets/oauth3.org b/assets/oauth3.org index 5f68ea1..9a7aa32 160000 --- a/assets/oauth3.org +++ b/assets/oauth3.org @@ -1 +1 @@ -Subproject commit 5f68ea19e22d05bebc6a289da0a89a714442e6d2 +Subproject commit 9a7aa3261f2ad97ebd436c8b1e86d168cf93023d diff --git a/css/styles.css b/css/styles.css index 9d9c5ce..17b1755 100644 --- a/css/styles.css +++ b/css/styles.css @@ -68,3 +68,84 @@ .button-container a:hover { text-decoration: none; } + +.current-user-container { + width: 100%; + display: inline-block; + font-size: 14px; + text-align: left; + background-color: #fff; + height: 40px; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.2); + box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); + margin-bottom: 10px; +} + +.current-user-container:hover{ + cursor: pointer; + -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.4); + box-shadow: 0 1px 1px 0 rgba(0,0,0,.3); +} + +.current-user-container > .current-user-split{ + background: #337ab7; + width: 33px; + float: left; + color: #fff!important; + height: 100%; + text-align: center; +} + +.current-user-container > .current-user-split > .glyphicon{ + position:relative; + top: calc(50% - 9px)!important; /* 50% - 3/4 of icon height */ +} +.current-user-container > .current-user-split.update-success{ + background: #5cb85c!important; +} +.current-user-container .current-user-text { + color: black; +} +.current-user-container > .current-user-split.update-danger{ + background: #d9534f!important; +} + +.current-user-container > .current-user-split.update-info{ + background: #5bc0de!important; +} +.current-user-container > .current-user-text{ + line-height: 19px; + padding-top: 11px; + padding-left: 45px; + padding-right: 20px; +} +.current-user-container i.fa.fa-user { + padding: 10px; + font-size: 20px; +} +.profiles { + border: 1px solid #dddddd; + margin-bottom: 20px; +} +.profile-content { + width: 320px; + padding: 15px; + padding-bottom:0px; +} +.profile-content:before, .profile-content:after { + display: table; + content: ""; + line-height: 0; +} +.profile-footer{ + background-color:#DDD; +} +.profile-footer-content { + padding:15px 15px 15px 15px; +} +.profile-container .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} diff --git a/js/app.js b/js/app.js index 9596546..f98416e 100644 --- a/js/app.js +++ b/js/app.js @@ -108,6 +108,16 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider controllerAs: 'vm' } } + }) + .state('app.account-settings', { + url: 'account-settings', + views: { + 'content@': { + templateUrl: 'templates/account-settings.html', + controller: 'loginCtrl', + controllerAs: 'vm' + } + } }); }]); diff --git a/js/controllers/login-controller.js b/js/controllers/login-controller.js index b037951..d2bc67f 100644 --- a/js/controllers/login-controller.js +++ b/js/controllers/login-controller.js @@ -122,10 +122,19 @@ app.controller('loginCtrl', [ vm.newIssuer = vm.defaultIssuer; vm.setIssuer(vm.defaultIssuer); + vm.initListLoggedInProfiles = function () { + vm.activeProfiles = Auth.getActiveSessions(); + }; + vm.signIn = function () { vm.auth(); }; + vm.masterLogOut = function () { + localStorage.clear(); + $location.path('/splash-page'); + }; + vm.signOut = function () { // TODO the sign-out url for each account should be fixed. return Auth.signOut().then(function () { diff --git a/js/services/auth-service.js b/js/services/auth-service.js index 8ace457..4c4b4c4 100644 --- a/js/services/auth-service.js +++ b/js/services/auth-service.js @@ -6,9 +6,6 @@ app.factory('Auth', [ var dapSessions = 'dap-sessions'; var Auth = { - setUser: function (currentUser) { - localStorageService.set('userAuth', JSON.stringify(currentUser)); - }, isLoggedIn: function () { Auth.restore(); @@ -18,6 +15,11 @@ app.factory('Auth', [ Auth.restore(); return Auth.session || false; + }, + getActiveSessions: function () { + Auth.restore(); + + return Auth.sessions || false; } , add: function (session) { var obj = JSON.parse(localStorage.getItem(dapSessions) || 'null') || {}; diff --git a/templates/account-settings.html b/templates/account-settings.html new file mode 100644 index 0000000..345d82a --- /dev/null +++ b/templates/account-settings.html @@ -0,0 +1,99 @@ + +

Account Settings

+

{{ vm.xauth }}

+
+ +
+
+ avatar +
Upload a different photo...
+ +
+
+ +
+

Personal Info

+

{{ vm.currentProfile.email }}

+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+

Active Sessions

+
+
+
+
+
+ Alternate Text +

Change Photo

+
+
+ +

+
+ +
+
+
+ +
+
+ +
+
+

Add Account

+
+
+
+
+
+ +
+

Log off all accounts

+ diff --git a/templates/partials/header.html b/templates/partials/header.html index 9f4fbfd..03e4e05 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -24,7 +24,7 @@
example.com diff --git a/templates/splash-page.html b/templates/splash-page.html index d12019c..c8c7ef1 100644 --- a/templates/splash-page.html +++ b/templates/splash-page.html @@ -1,6 +1,10 @@ -
+

Sign in

+ +
+
Resume with {{ profile.email }}
+