more themes

This commit is contained in:
antelle 2020-12-19 14:00:51 +01:00
parent 8aff64ce47
commit 8da0a2e239
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
10 changed files with 163 additions and 5 deletions

View File

@ -24,9 +24,13 @@ const SettingsManager = {
sd: 'setGenThemeSd',
sl: 'setGenThemeSl',
fb: 'setGenThemeFb',
bl: 'setGenThemeBl',
db: 'setGenThemeDb',
lb: 'setGenThemeLb',
te: 'setGenThemeTe',
hc: 'setGenThemeHc'
lt: 'setGenThemeLt',
hc: 'setGenThemeHc',
dc: 'setGenThemeDc'
},
autoSwitchedThemes: [
@ -39,6 +43,26 @@ const SettingsManager = {
name: 'setGenThemeSol',
dark: 'sd',
light: 'sl'
},
{
name: 'setGenThemeBlue',
dark: 'fb',
light: 'bl'
},
{
name: 'setGenThemeBrown',
dark: 'db',
light: 'lb'
},
{
name: 'setGenThemeTerminal',
dark: 'te',
light: 'lt'
},
{
name: 'setGenThemeHighContrast',
dark: 'dc',
light: 'hc'
}
],

View File

@ -1,6 +1,6 @@
const DefaultAppSettings = {
theme: null, // UI theme
autoSwitchTheme: false, // automatically switch between light and dark theme
autoSwitchTheme: true, // automatically switch between light and dark theme
locale: null, // user interface language
expandGroups: true, // show entries from all subgroups
listViewWidth: null, // width of the entry list representation

View File

@ -374,10 +374,18 @@
"setGenThemeDefault": "Default",
"setGenThemeDark": "Dark",
"setGenThemeLight": "Light",
"setGenThemeFb": "Flat blue",
"setGenThemeBlue": "Flat blue",
"setGenThemeFb": "Dark blue",
"setGenThemeBl": "Light blue",
"setGenThemeBrown": "Brownie",
"setGenThemeDb": "Dark brown",
"setGenThemeLb": "Light brown",
"setGenThemeTerminal": "Terminal",
"setGenThemeTe": "Terminal",
"setGenThemeLt": "Terminal light",
"setGenThemeHighContrast": "High contrast",
"setGenThemeHc": "High contrast",
"setGenThemeDc": "Dark contrast",
"setGenThemeSol": "Solarized",
"setGenThemeSd": "Solarized dark",
"setGenThemeSl": "Solarized light",

View File

@ -4,9 +4,13 @@ $themes: ();
@import 'dark';
@import 'light';
@import 'dark-brown';
@import 'light-brown';
@import 'flat-blue';
@import 'light-blue';
@import 'terminal';
@import 'light-terminal';
@import 'high-contrast';
@import 'dark-contrast';
@import 'solarized-dark';
@import 'solarized-light';

View File

@ -0,0 +1,45 @@
$themes: map-merge(
$themes,
(
dc:
map-merge(
$theme-defaults,
map-merge(
$light-colors,
(
background-color: #050505,
medium-color: #fafafa,
text-color: #fafafa,
action-color: #1e5db8,
error-color: #e74859,
mute-percent: 60%,
light-border-percent: 50%,
modal-opacity: 1
)
)
)
)
);
body.th-dc {
--selected-item-color: #1e5db8;
--selected-item-text-color: #fafafa;
.list__item--active .red-color {
color: #ff6d6b;
}
.list__item--active .orange-color {
color: #ffbb86;
}
.list__item--active .yellow-color {
}
.list__item--active .green-color {
color: #baff92;
}
.list__item--active .blue-color {
color: #c1d9ff;
}
.list__item--active .violet-color {
color: #ff93c5;
}
}

View File

@ -0,0 +1,25 @@
$themes: map-merge(
$themes,
(
bl:
map-merge(
$theme-defaults,
(
background-color: #d7dae0,
medium-color: #383b48,
text-color: #282c34,
action-color: #528bff,
error-color: #c34034,
mute-percent: 50%
)
)
)
);
body.th-bl {
--open-icon-color: #525462;
.list__item--active .blue-color {
color: #98bfff;
}
}

View File

@ -0,0 +1,26 @@
$themes: map-merge(
$themes,
(
lb:
map-merge(
$theme-defaults,
(
background-color: #fcf0e8,
medium-color: #454040,
text-color: #342f2e,
action-color: #2c9957,
error-color: #fd6d67,
mute-percent: 50%
)
)
)
);
body.th-lb {
.list__item--active .blue-color {
color: #0051d2;
}
.list__item--active .green-color {
color: #77d644;
}
}

View File

@ -0,0 +1,26 @@
$themes: map-merge(
$themes,
(
lt:
map-merge(
$theme-defaults,
(
background-color: #eee,
medium-color: #444,
text-color: #222,
action-color: #13a453,
error-color: #c34034,
mute-percent: 50%
)
)
)
);
body.th-lt {
.list__item--active .green-color {
color: #7be045;
}
.list__item--active .blue-color {
color: #0750c5;
}
}

View File

@ -28,7 +28,7 @@ body.th-light {
--selected-item-color: #2366d9;
--selected-on-secondary-item-color: #d6d6d6;
--selected-item-text-color: #f6f6f6;
--open-icon-color: var(--muted-color);
--open-icon-color: #565656;
.list__item--active .blue-color {
color: #7baeff;

View File

@ -85,7 +85,7 @@ const settingsPromise = loadSettingsEncryptionKey().then((key) => {
logProgress('loading settings key');
return loadConfig('app-settings').then((settings) => {
appSettings = settings ? JSON.parse(settings) : {};
appSettings = settings ? JSON.parse(settings) : { autoSwitchTheme: true };
logProgress('reading app settings');
});
});