client: add color scheme-related variations of the Next theme

This commit is contained in:
Adorian Doran 2024-12-16 21:13:29 +02:00
parent cd9af1c4ec
commit 3390a2a968
5 changed files with 9 additions and 1 deletions

View File

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

View File

@ -1074,7 +1074,9 @@
"override_theme_fonts_label": "Override theme fonts",
"light_theme": "Light",
"dark_theme": "Dark",
"triliumnext": "TriliumNext (beta)",
"triliumnext": "TriliumNext Beta (Follow system color scheme)",
"triliumnext-light": "TriliumNext Beta (Light)",
"triliumnext-dark": "TriliumNext Beta (Dark)",
"layout": "Layout",
"layout-vertical-title": "Vertical",
"layout-horizontal-title": "Horizontal",

View File

@ -68,6 +68,10 @@ function getThemeCssUrl(theme: string, themeNote: BNote | null) {
return `${assetPath}/stylesheets/theme-dark.css`;
} else if (theme === "next") {
return `${assetPath}/stylesheets/theme-next.css`;
} else if (theme === "next-light") {
return `${assetPath}/stylesheets/theme-next-light.css`;
} else if (theme === "next-dark") {
return `${assetPath}/stylesheets/theme-next-dark.css`;
} else if (!process.env.TRILIUM_SAFE_MODE && themeNote) {
return `api/notes/download/${themeNote.noteId}`;
} else {