mirror of
https://github.com/heyman/heynote.git
synced 2024-12-27 17:18:53 +01:00
Fix so that Settings dialog work when browser doesn't support queryLocalFonts()
This commit is contained in:
parent
09539f9cd8
commit
780a949a73
@ -40,7 +40,7 @@
|
|||||||
activeTab: "general",
|
activeTab: "general",
|
||||||
isWebApp: window.heynote.isWebApp,
|
isWebApp: window.heynote.isWebApp,
|
||||||
customBufferLocation: !!this.initialSettings.bufferPath,
|
customBufferLocation: !!this.initialSettings.bufferPath,
|
||||||
systemFonts: ["Hack"],
|
systemFonts: [[defaultFontFamily, defaultFontFamily + " (default)"]],
|
||||||
defaultFontSize: defaultFontSize,
|
defaultFontSize: defaultFontSize,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -48,7 +48,7 @@
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
||||||
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
||||||
this.systemFonts = [["Hack", "Hack (default)"], ...localFonts]
|
this.systemFonts = [[defaultFontFamily, defaultFontFamily + " (default)"], ...localFonts]
|
||||||
|
|
||||||
window.addEventListener("keydown", this.onKeyDown);
|
window.addEventListener("keydown", this.onKeyDown);
|
||||||
this.$refs.keymapSelector.focus()
|
this.$refs.keymapSelector.focus()
|
||||||
|
Loading…
Reference in New Issue
Block a user