make light theme by default on registration

pull/1315/head
Audric Ackermann 5 years ago
parent f7d6da0ebc
commit 864a9ee5ea
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -368,7 +368,7 @@
// These make key operations available to IPC handlers created in preload.js // These make key operations available to IPC handlers created in preload.js
window.Events = { window.Events = {
getThemeSetting: () => storage.get('theme-setting', 'dark'), getThemeSetting: () => storage.get('theme-setting', 'light'),
setThemeSetting: value => { setThemeSetting: value => {
storage.put('theme-setting', value); storage.put('theme-setting', value);
onChangeTheme(); onChangeTheme();

@ -22,18 +22,11 @@
openInbox: 'openInbox', openInbox: 'openInbox',
}, },
applyTheme() { applyTheme() {
const iOS = storage.get('userAgent') === 'OWI';
const theme = storage.get('theme-setting') || 'dark'; const theme = storage.get('theme-setting') || 'dark';
this.$el this.$el
.removeClass('light-theme') .removeClass('light-theme')
.removeClass('dark-theme') .removeClass('dark-theme')
.addClass(`${theme}-theme`); .addClass(`${theme}-theme`);
if (iOS) {
this.$el.addClass('ios-theme');
} else {
this.$el.removeClass('ios-theme');
}
}, },
applyHideMenu() { applyHideMenu() {
const hideMenuBar = storage.get('hide-menu-bar', true); const hideMenuBar = storage.get('hide-menu-bar', true);

@ -1,6 +1,8 @@
.session { .session {
&-fullscreen { &-fullscreen {
@include session-dark-background; @include themify($themes) {
background: themed('inboxBackground');
}
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
} }
@ -17,7 +19,9 @@
padding-left: 20px; padding-left: 20px;
&-text { &-text {
color: $session-color-white; @include themify($themes) {
color: themed('textColor');
}
font-family: $session-font-accent; font-family: $session-font-accent;
.title { .title {
@ -80,7 +84,9 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-color: $session-shade-6; @include themify($themes) {
background: themed('inputBackground');
}
padding: $session-margin-sm $session-margin-lg; padding: $session-margin-sm $session-margin-lg;
border-radius: 8px; border-radius: 8px;
margin-bottom: 0px; margin-bottom: 0px;
@ -109,7 +115,9 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
color: $session-color-white; @include themify($themes) {
background: themed('inboxBackground');
}
} }
&__tab { &__tab {
@ -118,19 +126,25 @@
padding-bottom: 10px; padding-bottom: 10px;
background-color: transparent; background-color: transparent;
text-align: center; text-align: center;
color: $session-color-white; @include themify($themes) {
border-bottom: 2px solid $session-color-dark-grey; border-bottom: themed('borderActionPanel');
color: themed('textColor');
}
transition: border-color $session-transition-duration linear; transition: border-color $session-transition-duration linear;
line-height: 17px; line-height: 17px;
font-size: 15px; font-size: 15px;
&--active { &--active {
border-bottom: $session-element-border-green; @include themify($themes) {
border-bottom: 4px solid themed('accent');
}
} }
} }
@mixin registration-label-mixin { @mixin registration-label-mixin {
color: $session-color-white; @include themify($themes) {
color: themed('textColor');
}
font-weight: bold; font-weight: bold;
padding: 12px; padding: 12px;
} }
@ -163,7 +177,9 @@
&-input-with-label-container { &-input-with-label-container {
height: 46.5px; height: 46.5px;
width: 280px; width: 280px;
color: $session-color-white; @include themify($themes) {
color: themed('textColor');
}
padding: 2px 0 2px 0; padding: 2px 0 2px 0;
transition: opacity $session-transition-duration; transition: opacity $session-transition-duration;
opacity: 1; opacity: 1;
@ -172,7 +188,9 @@
label { label {
line-height: 14px; line-height: 14px;
opacity: 0; opacity: 0;
color: #737373; @include themify($themes) {
color: themed('textColor');
}
font-size: 10px; font-size: 10px;
line-height: 11px; line-height: 11px;
position: absolute; position: absolute;
@ -184,7 +202,9 @@
} }
&.error { &.error {
color: red; @include themify($themes) {
color: themed('destructive');
}
} }
input { input {
@ -193,7 +213,9 @@
height: 14px; height: 14px;
width: 280px; width: 280px;
background: transparent; background: transparent;
color: $session-color-white; @include themify($themes) {
color: themed('textColor');
}
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
position: absolute; position: absolute;
@ -202,7 +224,9 @@
} }
hr { hr {
border: 1px solid $session-color-light-grey; @include themify($themes) {
border: themed('borderActionPanel');
}
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
@ -218,7 +242,9 @@
&-terms-conditions-agreement { &-terms-conditions-agreement {
padding-top: $session-margin-md; padding-top: $session-margin-md;
color: $session-color-light-grey; @include themify($themes) {
@include session-color-subtle(themed('textColor'));
}
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
@ -226,15 +252,21 @@
white-space: nowrap; white-space: nowrap;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
color: $session-color-light-grey; @include themify($themes) {
@include session-color-subtle(themed('textColor'));
}
transition: $session-transition-duration; transition: $session-transition-duration;
&:visited &:link { &:visited &:link {
color: $session-color-light-grey; @include themify($themes) {
@include session-color-subtle(themed('textColor'));
}
} }
&:hover { &:hover {
color: $session-color-white; @include themify($themes) {
color: themed('textColor');
}
} }
} }
} }
@ -243,7 +275,9 @@
&-signin-device-pairing-header { &-signin-device-pairing-header {
padding-top: 10px; padding-top: 10px;
padding-bottom: 20px; padding-bottom: 20px;
color: $session-color-light-grey; @include themify($themes) {
@include session-color-subtle(themed('textColor'));
}
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
@ -288,7 +322,9 @@
[contenteditable='true']:empty::before { [contenteditable='true']:empty::before {
content: attr(placeholder); content: attr(placeholder);
color: $session-color-light-grey; @include themify($themes) {
@include session-color-subtle(themed('textColor'));
}
font-size: 13px; font-size: 13px;
} }

Loading…
Cancel
Save