mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-01 18:31:31 +08:00
feat(server): define code note theme option
This commit is contained in:
parent
224b7f4826
commit
92dcfb3304
@ -23,6 +23,7 @@ const ALLOWED_OPTIONS = new Set<OptionNames>([
|
||||
"theme",
|
||||
"codeBlockTheme",
|
||||
"codeBlockWordWrap",
|
||||
"codeNoteTheme",
|
||||
"syncServerHost",
|
||||
"syncServerTimeout",
|
||||
"syncProxy",
|
||||
|
@ -137,6 +137,18 @@ const defaultOptions: DefaultOption[] = [
|
||||
|
||||
// Appearance
|
||||
{ name: "splitEditorOrientation", value: "horizontal", isSynced: true },
|
||||
{
|
||||
name: "codeNoteTheme",
|
||||
value: (optionsMap) => {
|
||||
switch (optionsMap.theme) {
|
||||
case "light":
|
||||
case "dark":
|
||||
default:
|
||||
return "default:abyss";
|
||||
}
|
||||
},
|
||||
isSynced: false
|
||||
},
|
||||
|
||||
// Internationalization
|
||||
{ name: "locale", value: "en", isSynced: true },
|
||||
|
@ -91,6 +91,7 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
|
||||
|
||||
// Appearance
|
||||
splitEditorOrientation: "horziontal" | "vertical";
|
||||
codeNoteTheme: string;
|
||||
|
||||
initialized: boolean;
|
||||
isPasswordSet: boolean;
|
||||
|
Loading…
x
Reference in New Issue
Block a user