feat(theme): start implementing a theme for TriliumNext

This commit is contained in:
Elian Doran
2024-11-22 20:09:32 +02:00
parent 79b31bda76
commit 7cb9671fe3
4 changed files with 6 additions and 2 deletions

View File

@@ -41,8 +41,9 @@ export default class ThemeOptions extends OptionsWidget {
async optionsLoaded(options) {
const themes = [
{ val: 'next', title: t("theme.triliumnext") },
{ val: 'light', title: t('theme.light_theme') },
{ val: 'dark', title: t('theme.dark_theme') }
{ val: 'dark', title: t('theme.dark_theme') }
].concat(await server.get('options/user-themes'));
this.$themeSelect.empty();

View File

View File

@@ -1061,7 +1061,8 @@
"theme_label": "Theme",
"override_theme_fonts_label": "Override theme fonts",
"light_theme": "Light",
"dark_theme": "Dark"
"dark_theme": "Dark",
"triliumnext": "TriliumNext"
},
"zoom_factor": {
"title": "Zoom Factor (desktop build only)",

View File

@@ -54,6 +54,8 @@ function getThemeCssUrl(theme: string) {
return false; // light theme is always loaded as baseline
} else if (theme === 'dark') {
return `${assetPath}/stylesheets/theme-dark.css`;
} else if (theme === "next") {
return `${assetPath}/stylesheets/theme-next.css`;
} else {
const themeNote = attributeService.getNoteWithLabel('appTheme', theme);