diff --git a/css/styles.css b/css/styles.css index 17b1755..7dd4293 100644 --- a/css/styles.css +++ b/css/styles.css @@ -15,7 +15,6 @@ .login-container { top: 25vh; } - /* Common CSS */ .cp { cursor: pointer; diff --git a/js/app.js b/js/app.js index e06eb10..64662f0 100644 --- a/js/app.js +++ b/js/app.js @@ -11,17 +11,15 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider data: { requiresLogin: false }, url: '/splash-page', templateUrl: '/templates/splash-page.html', - controller: 'loginCtrl', - controllerAs: 'vm' + controller: 'loginCtrl as vm' }) .state('app',{ data: { requiresLogin: true }, url: '/', + controller: 'loginCtrl as vm', views: { 'header': { templateUrl: '/templates/partials/header.html', - controller: 'loginCtrl', - controllerAs: 'vm' }, 'menu': { templateUrl: '/templates/partials/menu.html' @@ -36,8 +34,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/home.html', - controller: 'loginCtrl', - controllerAs: 'vm' + controller: 'loginCtrl as vm' } } }) @@ -46,8 +43,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/bolt.html', - controller: 'boltCtrl', - controllerAs: 'vm' + controller: 'boltCtrl as vm', } } }) @@ -56,8 +52,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/files.html', - controller: 'fileCtrl', - controllerAs: 'vm' + controller: 'fileCtrl as vm', } } }) @@ -66,8 +61,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/contacts.html', - controller: 'contactCtrl', - controllerAs: 'vm' + controller: 'contactCtrl as vm', } } }) @@ -76,8 +70,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/music.html', - controller: 'musicCtrl', - controllerAs: 'vm' + controller: 'musicCtrl as vm', } } }) @@ -86,8 +79,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/email.html', - controller: 'emailCtrl', - controllerAs: 'vm' + controller: 'emailCtrl as vm', } } }) @@ -96,8 +88,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/website.html', - controller: 'websiteCtrl', - controllerAs: 'vm' + controller: 'websiteCtrl as vm', } } }) @@ -107,7 +98,6 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider 'content@': { templateUrl: 'templates/dns.html', controller: 'dnsCtrl', - controllerAs: 'vm' } } }) @@ -116,8 +106,7 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider views: { 'content@': { templateUrl: 'templates/account-settings.html', - controller: 'loginCtrl', - controllerAs: 'vm' + controller: 'loginCtrl as vm', } } }); diff --git a/js/controllers/bolt-controller.js b/js/controllers/bolt-controller.js index fa8f59c..4e5b423 100644 --- a/js/controllers/bolt-controller.js +++ b/js/controllers/bolt-controller.js @@ -1,10 +1,6 @@ app.controller('boltCtrl', [ '$scope', 'Auth', function($scope, Auth) { - + var vm = this; - vm.userName = function(profile){ - profile = Auth.getProfile(); - return profile.email; - }; }]); diff --git a/js/controllers/contact-controller.js b/js/controllers/contact-controller.js index 8e56cc1..2235e3c 100644 --- a/js/controllers/contact-controller.js +++ b/js/controllers/contact-controller.js @@ -1,4 +1,4 @@ -app.controller('contactCrtl', [ +app.controller('contactCtrl', [ '$scope', function($scope) { diff --git a/js/controllers/login-controller.js b/js/controllers/login-controller.js index 56f294e..bcca67c 100644 --- a/js/controllers/login-controller.js +++ b/js/controllers/login-controller.js @@ -122,6 +122,10 @@ app.controller('loginCtrl', [ vm.newIssuer = vm.defaultIssuer; vm.setIssuer(vm.defaultIssuer); + vm.getSession = function() { + return Auth.select(Auth.session); + }; + vm.initListLoggedInProfiles = function () { vm.activeProfiles = Auth.getActiveSessions(); }; @@ -136,13 +140,15 @@ app.controller('loginCtrl', [ }; vm.signOut = function () { - // TODO the sign-out url for each account should be fixed. - return Auth.signOut().then(function () { - if (Auth.sessions.length === 0) { - $location.path('/splash-page'); - return; - } - window.alert("You are still logged in with other accounts."); + vm.getSession().then(function(){ + // TODO the sign-out url for each account should be fixed. + return Auth.signOut().then(function () { + if (Auth.sessions.length === 0) { + $location.path('/splash-page'); + return; + } + window.alert("You are still logged in with other accounts."); + }); }); }; diff --git a/js/services/auth-service.js b/js/services/auth-service.js index d719b10..0bc7791 100644 --- a/js/services/auth-service.js +++ b/js/services/auth-service.js @@ -64,12 +64,11 @@ app.factory('Auth', [ Auth.sessions.push(session); }); - return Auth.session; } , select: function (session) { if (!session.issuer) { - throw new Error("session doesn't have an issuer");; + throw new Error("session doesn't have an issuer"); } var name = session.token.sub + '@' + session.token.iss; @@ -108,7 +107,6 @@ app.factory('Auth', [ , signOut: function () { var session = Auth.session; var dapName = 'dap-' + session.subject + '|' + session.issuer; - // TODO logout url should be created upon login and remain fixed throughout the duration of the session (or on session restoration) return Auth.oauth3.logout().then(function () { var obj = JSON.parse(localStorage.getItem(dapSessions) || '{}'); diff --git a/js/www@daplie.com.js b/js/www@daplie.com.js index c90fed0..472226b 100644 --- a/js/www@daplie.com.js +++ b/js/www@daplie.com.js @@ -7,7 +7,7 @@ OAUTH3._pkgs['www@daplie.com'] = { add: function (opts) { var providerUri = opts.audience; var session = opts.session; - + debugger; return OAUTH3.request({ method: 'POST' , url: OAUTH3.url.normalize(providerUri) diff --git a/templates/account-settings.html b/templates/account-settings.html index d6fe426..75e88b9 100644 --- a/templates/account-settings.html +++ b/templates/account-settings.html @@ -1,7 +1,5 @@ -

Account Settings

-
avatar @@ -9,9 +7,7 @@
-
-

Personal Info

@@ -28,7 +24,7 @@
- +
@@ -60,7 +56,7 @@ Use Account
diff --git a/templates/contacts.html b/templates/contacts.html index 26dc776..3b49e47 100644 --- a/templates/contacts.html +++ b/templates/contacts.html @@ -1,12 +1,243 @@ -

Contacts

+
- + -
+

You haven't added any contacts yet!

+
+
+ +
+ + +
+

Importing Contacts...

+ +
+
+ 30% Complete +
+
+ +

Recent Contacts

+ + + + + + + + + + + + + + + + + + + + +
Best Friendbest@frind.com555-555-5309
Notbest Friendnot@best.com555-867-5555
Uncle Benuncle@ben.com555-867-1234
+ +

Core to reconnect with these old friends?

+ +
+ + + + + + + + + + + + + + + + + + + +
John Doejohn@doe.com555-867-5309 + + +
Bob Smithbob@smith.com555-867-5308 + + +
Jane Austinjane@austin.com555-867-5307 + + +
+
+ +
+ + +
+
+ + John Doe +
+

john@doe.com

+

555-867-5309

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

Conversations

+
+ + | + +
+

Photos

+
+ + | + +
+

Files

+
+ + | + +

More

+
+
+ +
+

Me: Hey John, did you know that you are my best friend?

+

John: No way! You're my best friend, too!

+

Me: Wow! We sure are awesome friends together! :)

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

filename.ext

+
+
+ +

filename.ext

+
+
+ +

filename.ext

+
+
+ +

filename.ext

+
+
+ +

filename.ext

+
+
+
+ +
+
+

Remember when...?

+
+
+
+
Taken Feb 20, 2017
+
+ +
+
+
+
Sent on June 5, 2017
+
+

Hey Jane,

+

Love the new do!

+

You're so lucky to have great
hair I'm super jealous...

+
+
+
+
Shared on Ap...
+
+ +
+

Come Fly with Me

+

Frank Sinatra

+
+
+
+
+
+ +
+ + diff --git a/templates/files.html b/templates/files.html index ecddc2d..2a2924d 100644 --- a/templates/files.html +++ b/templates/files.html @@ -44,7 +44,7 @@ --> - + {{ shared_artist }} December 23, 2016 @@ -61,7 +61,7 @@ --> - + {{ artist }} June 13, 2017 diff --git a/templates/home.html b/templates/home.html index 463c64c..fdd98aa 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,13 +1,7 @@ -
- -
- -
-
-
System Message > Jane Smith {{ vm.userName() }}
+
System Message >

@@ -39,5 +33,3 @@
- -
diff --git a/templates/partials/header.html b/templates/partials/header.html index fb4afac..2c0cb1a 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -1,4 +1,4 @@ -