mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
feat(client): set color scheme option
This commit is contained in:
parent
92dcfb3304
commit
af187d1188
@ -30,6 +30,10 @@ export default class CodeTheme extends OptionsWidget {
|
|||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
this.$themeSelect = this.$widget.find(".theme-select");
|
this.$themeSelect = this.$widget.find(".theme-select");
|
||||||
|
this.$themeSelect.on("change", async () => {
|
||||||
|
const newTheme = String(this.$themeSelect.val());
|
||||||
|
await server.put(`options/codeNoteTheme/${newTheme}`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async optionsLoaded(options: OptionMap) {
|
async optionsLoaded(options: OptionMap) {
|
||||||
@ -40,6 +44,8 @@ export default class CodeTheme extends OptionsWidget {
|
|||||||
const option = $("<option>").attr("value", theme.val).text(theme.title);
|
const option = $("<option>").attr("value", theme.val).text(theme.title);
|
||||||
this.$themeSelect.append(option);
|
this.$themeSelect.append(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$themeSelect.val(options.codeNoteTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user