Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client: add color scheme-related variations of the Next theme
Adorian Doran3390a2a968a6
diff --git a/src/public/app/widgets/type_widgets/options/appearance/theme.js b/src/public/app/widgets/type_widgets/options/appearance/theme.jsindex df92c38750..ec88cdf8e7 100644--- a/src/public/app/widgets/type_widgets/options/appearance/theme.js+++ b/src/public/app/widgets/type_widgets/options/appearance/theme.js@@ -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'));diff --git a/src/public/stylesheets/theme-next-dark.css b/src/public/stylesheets/theme-next-dark.cssnew file mode 100644index 0000000000..e69de29bb2diff --git a/src/public/stylesheets/theme-next-light.css b/src/public/stylesheets/theme-next-light.cssnew file mode 100644index 0000000000..e69de29bb2diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex cb992b5da7..1dbe90aeb8 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -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",diff --git a/src/routes/index.ts b/src/routes/index.tsindex 658a47796a..16ddf0f704 100644--- a/src/routes/index.ts+++ b/src/routes/index.ts@@ -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 {