Add font settings

This commit is contained in:
aet
2022-02-21 03:54:04 -05:00
parent 16575b6739
commit a06d5189de
14 changed files with 613 additions and 457 deletions

View File

@ -6,6 +6,8 @@ export enum Key {
PREFERRED_LOCALE = "app.config.locale",
ENABLE_AUTO_LOCK = "app.config.enable_auto_lock",
AUTO_LOCK_AFTER = "app.config.auto_lock_after",
UI_FONT = "app.config.font.ui",
MONOSPACE_FONT = "app.config.font.monospace",
}
interface StoredData {
@ -14,6 +16,8 @@ interface StoredData {
[Key.PREFERRED_LOCALE]: string
[Key.ENABLE_AUTO_LOCK]: boolean
[Key.AUTO_LOCK_AFTER]: number
[Key.UI_FONT]: string
[Key.MONOSPACE_FONT]: string
}
const events = new Map(Object.values(Key).map(key => [key, new Set()])) as {
@ -74,3 +78,5 @@ const defaults: typeof set = (key, value) => {
defaults(Key.ENABLE_AUTO_LOCK, true)
defaults(Key.AUTO_LOCK_AFTER, 180)
defaults(Key.RECENTLY_OPENED_VAULTS, [])
defaults(Key.UI_FONT, "")
defaults(Key.MONOSPACE_FONT, "")