From 864a9ee5ea62d96172a5cd5283cbc79c799aa6d9 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 27 Aug 2020 14:02:29 +1000 Subject: [PATCH] make light theme by default on registration --- js/background.js | 2 +- js/views/app_view.js | 7 --- stylesheets/_session_signin.scss | 74 ++++++++++++++++++++++++-------- 3 files changed, 56 insertions(+), 27 deletions(-) diff --git a/js/background.js b/js/background.js index d1aa1b925..b4522661c 100644 --- a/js/background.js +++ b/js/background.js @@ -368,7 +368,7 @@ // These make key operations available to IPC handlers created in preload.js window.Events = { - getThemeSetting: () => storage.get('theme-setting', 'dark'), + getThemeSetting: () => storage.get('theme-setting', 'light'), setThemeSetting: value => { storage.put('theme-setting', value); onChangeTheme(); diff --git a/js/views/app_view.js b/js/views/app_view.js index 8691f722e..f271b2149 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -22,18 +22,11 @@ openInbox: 'openInbox', }, applyTheme() { - const iOS = storage.get('userAgent') === 'OWI'; const theme = storage.get('theme-setting') || 'dark'; this.$el .removeClass('light-theme') .removeClass('dark-theme') .addClass(`${theme}-theme`); - - if (iOS) { - this.$el.addClass('ios-theme'); - } else { - this.$el.removeClass('ios-theme'); - } }, applyHideMenu() { const hideMenuBar = storage.get('hide-menu-bar', true); diff --git a/stylesheets/_session_signin.scss b/stylesheets/_session_signin.scss index 115ce2577..ddf2f7524 100644 --- a/stylesheets/_session_signin.scss +++ b/stylesheets/_session_signin.scss @@ -1,6 +1,8 @@ .session { &-fullscreen { - @include session-dark-background; + @include themify($themes) { + background: themed('inboxBackground'); + } overflow-y: auto; height: 100%; } @@ -17,7 +19,9 @@ padding-left: 20px; &-text { - color: $session-color-white; + @include themify($themes) { + color: themed('textColor'); + } font-family: $session-font-accent; .title { @@ -80,7 +84,9 @@ display: flex; flex-direction: column; align-items: center; - background-color: $session-shade-6; + @include themify($themes) { + background: themed('inputBackground'); + } padding: $session-margin-sm $session-margin-lg; border-radius: 8px; margin-bottom: 0px; @@ -109,7 +115,9 @@ margin-left: auto; margin-right: auto; - color: $session-color-white; + @include themify($themes) { + background: themed('inboxBackground'); + } } &__tab { @@ -118,19 +126,25 @@ padding-bottom: 10px; background-color: transparent; text-align: center; - color: $session-color-white; - border-bottom: 2px solid $session-color-dark-grey; + @include themify($themes) { + border-bottom: themed('borderActionPanel'); + color: themed('textColor'); + } transition: border-color $session-transition-duration linear; line-height: 17px; font-size: 15px; &--active { - border-bottom: $session-element-border-green; + @include themify($themes) { + border-bottom: 4px solid themed('accent'); + } } } @mixin registration-label-mixin { - color: $session-color-white; + @include themify($themes) { + color: themed('textColor'); + } font-weight: bold; padding: 12px; } @@ -163,7 +177,9 @@ &-input-with-label-container { height: 46.5px; width: 280px; - color: $session-color-white; + @include themify($themes) { + color: themed('textColor'); + } padding: 2px 0 2px 0; transition: opacity $session-transition-duration; opacity: 1; @@ -172,7 +188,9 @@ label { line-height: 14px; opacity: 0; - color: #737373; + @include themify($themes) { + color: themed('textColor'); + } font-size: 10px; line-height: 11px; position: absolute; @@ -184,7 +202,9 @@ } &.error { - color: red; + @include themify($themes) { + color: themed('destructive'); + } } input { @@ -193,7 +213,9 @@ height: 14px; width: 280px; background: transparent; - color: $session-color-white; + @include themify($themes) { + color: themed('textColor'); + } font-size: 12px; line-height: 14px; position: absolute; @@ -202,7 +224,9 @@ } hr { - border: 1px solid $session-color-light-grey; + @include themify($themes) { + border: themed('borderActionPanel'); + } width: 100%; position: absolute; bottom: 0px; @@ -218,7 +242,9 @@ &-terms-conditions-agreement { padding-top: $session-margin-md; - color: $session-color-light-grey; + @include themify($themes) { + @include session-color-subtle(themed('textColor')); + } text-align: center; font-size: 12px; @@ -226,15 +252,21 @@ white-space: nowrap; font-weight: bold; text-decoration: none; - color: $session-color-light-grey; + @include themify($themes) { + @include session-color-subtle(themed('textColor')); + } transition: $session-transition-duration; &:visited &:link { - color: $session-color-light-grey; + @include themify($themes) { + @include session-color-subtle(themed('textColor')); + } } &:hover { - color: $session-color-white; + @include themify($themes) { + color: themed('textColor'); + } } } } @@ -243,7 +275,9 @@ &-signin-device-pairing-header { padding-top: 10px; padding-bottom: 20px; - color: $session-color-light-grey; + @include themify($themes) { + @include session-color-subtle(themed('textColor')); + } text-align: center; font-size: 12px; line-height: 20px; @@ -288,7 +322,9 @@ [contenteditable='true']:empty::before { content: attr(placeholder); - color: $session-color-light-grey; + @include themify($themes) { + @include session-color-subtle(themed('textColor')); + } font-size: 13px; }