diff --git a/README.md b/README.md index 2947f3e..9ee46a2 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ Then visit [http://localhost:8580/dist/chrome.html#/desktop](http://localhost:85 We work together with existing open source projects wherever possible and contribute any changes we make back upstream. Many of theses libraries are licensed under an open source license. Here are some of them: -* [OpenPGP.js](http://openpgpjs.org): An implementation of OpenPGP in Javascript -* [Inbox](https://github.com/andris9/inbox): Simple IMAP client for node.js -* [Nodemailer](http://www.nodemailer.com): SMTP client for node.js -* [Forge](https://github.com/digitalbazaar/forge): An implementation of TLS in Javascript -* [node-shims](https://github.com/whiteout-io/node-shims): Shims for wrapping node's net/tls (TCP socket) APIs around chrome.socket +* [OpenPGP.js](http://openpgpjs.org) (LGPL license): An implementation of OpenPGP in Javascript +* [Inbox](https://github.com/andris9/inbox) (MIT license): Simple IMAP client for node.js +* [Nodemailer](http://www.nodemailer.com) (MIT license): SMTP client for node.js +* [Forge](https://github.com/digitalbazaar/forge) (BSD license): An implementation of TLS in Javascript +* [node-shims](https://github.com/whiteout-io/node-shims) (MIT license): Shims for wrapping node's net/tls (TCP socket) APIs around chrome.socket diff --git a/src/js/app-config.js b/src/js/app-config.js index 7f41f90..511fae7 100644 --- a/src/js/app-config.js +++ b/src/js/app-config.js @@ -3,7 +3,7 @@ define(function(require) { var _ = require('underscore'), app = {}, - cloudUrl, clientId; + appVersion, cloudUrl, clientId; // parse manifest to get configurations for current runtime try { @@ -16,6 +16,8 @@ define(function(require) { cloudUrl = cloudUrl.substring(0, cloudUrl.length - 1); // get client ID for OAuth requests clientId = manifest.oauth2.client_id; + // get the app version + appVersion = manifest.version; } catch (e) {} /** @@ -44,7 +46,8 @@ define(function(require) { iconPath: '/img/icon.png', verificationUrl: '/verify/', verificationUuidLength: 36, - dbVersion: 1 + dbVersion: 1, + appVersion: appVersion }; /** diff --git a/src/js/app.js b/src/js/app.js index 656bfdd..3669788 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -9,6 +9,7 @@ requirejs([ 'js/controller/account', 'js/controller/set-passphrase', 'js/controller/contacts', + 'js/controller/about', 'js/controller/login', 'js/controller/login-initial', 'js/controller/login-new-device', @@ -29,6 +30,7 @@ requirejs([ AccountCtrl, SetPassphraseCtrl, ContactsCtrl, + AboutCtrl, LoginCtrl, LoginInitialCtrl, LoginNewDeviceCtrl, @@ -96,6 +98,7 @@ requirejs([ app.controller('AccountCtrl', AccountCtrl); app.controller('SetPassphraseCtrl', SetPassphraseCtrl); app.controller('ContactsCtrl', ContactsCtrl); + app.controller('AboutCtrl', AboutCtrl); app.controller('DialogCtrl', DialogCtrl); app.controller('PopoverCtrl', PopoverCtrl); diff --git a/src/js/controller/about.js b/src/js/controller/about.js new file mode 100644 index 0000000..7df3cfd --- /dev/null +++ b/src/js/controller/about.js @@ -0,0 +1,32 @@ +define(function(require) { + 'use strict'; + + var cfg = require('js/app-config').config; + + // + // Controller + // + + var AboutCtrl = function($scope) { + + $scope.state.about = { + open: false, + toggle: function(to) { + this.open = to; + } + }; + + // + // scope variables + // + + $scope.version = cfg.appVersion; + $scope.date = new Date(); + + // + // scope functions + // + }; + + return AboutCtrl; +}); \ No newline at end of file diff --git a/src/js/controller/login-initial.js b/src/js/controller/login-initial.js index 72564dd..c557af0 100644 --- a/src/js/controller/login-initial.js +++ b/src/js/controller/login-initial.js @@ -6,7 +6,7 @@ define(function(require) { var LoginInitialCtrl = function($scope, $location) { var emailDao = appController._emailDao, - states; + states, termsMsg = 'You must accept the Terms of Service to continue.'; // global state... inherited to all child scopes $scope.$root.state = {}; @@ -25,6 +25,13 @@ define(function(require) { // $scope.importKey = function() { + if (!$scope.state.agree) { + $scope.onError({ + message: termsMsg + }); + return; + } + $location.path('/login-new-device'); }; @@ -89,6 +96,13 @@ define(function(require) { return; } + if (!$scope.state.agree) { + $scope.onError({ + message: termsMsg + }); + return; + } + $scope.setState(states.PROCESSING); setTimeout(function() { emailDao.unlock({ diff --git a/src/sass/all.scss b/src/sass/all.scss index 5f94d17..09e309c 100755 --- a/src/sass/all.scss +++ b/src/sass/all.scss @@ -27,6 +27,7 @@ @import "views/account"; @import "views/set-passphrase"; @import "views/contacts"; +@import "views/about"; @import "views/dialog"; @import "views/navigation"; @import "views/mail-list"; diff --git a/src/sass/components/_dialog.scss b/src/sass/components/_dialog.scss index 2794a6d..781878e 100644 --- a/src/sass/components/_dialog.scss +++ b/src/sass/components/_dialog.scss @@ -2,11 +2,6 @@ padding: 0px; color: $color-grey-dark; - @include respond-to(mobile) { - top: 0; - max-width: 100%; - } - .control { float: right; diff --git a/src/sass/views/_about.scss b/src/sass/views/_about.scss new file mode 100644 index 0000000..c860d07 --- /dev/null +++ b/src/sass/views/_about.scss @@ -0,0 +1,15 @@ +.view-about { + @include respond-to(desktop) { + max-width: 550px; + } + + .content { + margin: 30px auto; + text-align: center; + + a { + color: $color-blue; + } + } + +} \ No newline at end of file diff --git a/src/sass/views/_dialog.scss b/src/sass/views/_dialog.scss index 49a66aa..0ad95a3 100644 --- a/src/sass/views/_dialog.scss +++ b/src/sass/views/_dialog.scss @@ -1,7 +1,10 @@ .view-dialog { - max-width: 350px; height: auto; - top: 30%; + + @include respond-to(desktop) { + max-width: 350px; + top: 30%; + } p { text-align: center; diff --git a/src/sass/views/_login.scss b/src/sass/views/_login.scss index a674748..7351377 100644 --- a/src/sass/views/_login.scss +++ b/src/sass/views/_login.scss @@ -24,12 +24,12 @@ margin-left: auto; margin-right: auto; + b, a { + color: $color-blue; + } + p { line-height: 150%; - - b, a { - color: $color-blue; - } } div { @@ -69,6 +69,13 @@ .passphrase-label-ok { color: green; } + + .opt-in-terms { + .checkbox-wrapper { + margin-top: 0; + float: left; + } + } } } @@ -76,7 +83,9 @@ } .view-login-initial { - button { - margin-right: 10px; + .content { + button { + margin-right: 10px; + } } } \ No newline at end of file diff --git a/src/tpl/about.html b/src/tpl/about.html new file mode 100644 index 0000000..521c5bd --- /dev/null +++ b/src/tpl/about.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/src/tpl/desktop.html b/src/tpl/desktop.html index 5a6b0e4..2a659ec 100644 --- a/src/tpl/desktop.html +++ b/src/tpl/desktop.html @@ -31,6 +31,9 @@ + \ No newline at end of file diff --git a/src/tpl/login-existing.html b/src/tpl/login-existing.html index 2edba71..445c723 100644 --- a/src/tpl/login-existing.html +++ b/src/tpl/login-existing.html @@ -20,7 +20,7 @@ diff --git a/src/tpl/login-initial.html b/src/tpl/login-initial.html index 23f73df..08c6162 100644 --- a/src/tpl/login-initial.html +++ b/src/tpl/login-initial.html @@ -14,6 +14,12 @@ + +
+
+
I agree to the Whiteout Networks Terms of Service and have read the Privacy Policy.
+
+
@@ -29,7 +35,7 @@ diff --git a/src/tpl/login-new-device.html b/src/tpl/login-new-device.html index 56834ca..f123a2b 100644 --- a/src/tpl/login-new-device.html +++ b/src/tpl/login-new-device.html @@ -22,7 +22,7 @@ diff --git a/src/tpl/login.html b/src/tpl/login.html index b200da9..dec01ee 100644 --- a/src/tpl/login.html +++ b/src/tpl/login.html @@ -12,5 +12,5 @@ \ No newline at end of file diff --git a/src/tpl/navigation.html b/src/tpl/navigation.html index 64d3c6f..a054a3a 100644 --- a/src/tpl/navigation.html +++ b/src/tpl/navigation.html @@ -17,7 +17,7 @@