Web app: implement markdown support

This commit is contained in:
Nihal Gonsalves
2023-07-05 19:33:45 +02:00
parent 56ed4f0515
commit f989fd0743
7 changed files with 648 additions and 8 deletions

View File

@@ -55,6 +55,15 @@ class Prefs {
async setTheme(mode) {
await this.db.prefs.put({ key: "theme", value: mode });
}
async markdownAlwaysEnabled() {
const record = await this.db.prefs.get("markdownAlwaysEnabled");
return record?.value ?? false;
}
async setMarkdownAlwaysEnabled(enabled) {
await this.db.prefs.put({ key: "markdownAlwaysEnabled", value: enabled });
}
}
const prefs = new Prefs(db());