diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-01-04 03:06:08 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-01-04 03:06:08 +0800 |
commit | a6f062a6865d3e1e5ceb98885ab4b38713e4293d (patch) | |
tree | ea379a341cc19f8942536b1800c309f7d79b3583 /app/scripts/lib | |
parent | 313b3c087a09bcc4462da15ff3caeac515967cf5 (diff) | |
parent | dfb22471087f040d8345a5a17321e1462842045c (diff) | |
download | tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar.gz tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar.bz2 tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar.lz tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar.xz tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.tar.zst tangerine-wallet-browser-a6f062a6865d3e1e5ceb98885ab4b38713e4293d.zip |
Merge branch 'NewUI-flat' into NewUI-flat-4.0.5c
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/environment-type.js | 10 | ||||
-rw-r--r-- | app/scripts/lib/is-popup-or-notification.js | 5 | ||||
-rw-r--r-- | app/scripts/lib/notification-manager.js | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/app/scripts/lib/environment-type.js b/app/scripts/lib/environment-type.js new file mode 100644 index 000000000..7966926eb --- /dev/null +++ b/app/scripts/lib/environment-type.js @@ -0,0 +1,10 @@ +module.exports = function environmentType () { + const url = window.location.href + if (url.match(/popup.html$/)) { + return 'popup' + } else if (url.match(/home.html$/)) { + return 'responsive' + } else { + return 'notification' + } +} diff --git a/app/scripts/lib/is-popup-or-notification.js b/app/scripts/lib/is-popup-or-notification.js index 693fa8751..e2999411f 100644 --- a/app/scripts/lib/is-popup-or-notification.js +++ b/app/scripts/lib/is-popup-or-notification.js @@ -1,6 +1,9 @@ module.exports = function isPopupOrNotification () { const url = window.location.href - if (url.match(/popup.html$/)) { + // if (url.match(/popup.html$/) || url.match(/home.html$/)) { + // Below regexes needed for feature toggles (e.g. see line ~340 in ui/app/app.js) + // Revert below regexes to above commented out regexes before merge to master + if (url.match(/popup.html(?:\?.+)*$/) || url.match(/home.html(?:\?.+)*$/)) { return 'popup' } else { return 'notification' diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js index 7846ef7f0..adaf60c65 100644 --- a/app/scripts/lib/notification-manager.js +++ b/app/scripts/lib/notification-manager.js @@ -1,5 +1,5 @@ const extension = require('extensionizer') -const height = 520 +const height = 620 const width = 360 |