mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
chore(react/settings): reimplement reset shortcuts
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { OptionNames } from "@triliumnext/commons";
|
||||
import server from "./server.js";
|
||||
import { isShare } from "./utils.js";
|
||||
|
||||
@@ -76,6 +77,10 @@ class Options {
|
||||
await server.put(`options`, payload);
|
||||
}
|
||||
|
||||
async saveMany<T extends OptionNames>(newValues: Record<T, OptionValue>) {
|
||||
await server.put<void>("options", newValues);
|
||||
}
|
||||
|
||||
async toggle(key: string) {
|
||||
await this.save(key, (!this.is(key)).toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user