mirror of
https://github.com/heyman/heynote.git
synced 2025-02-04 12:29:16 +01:00
Fix broken Settings dialog in browsers that doesn't support queryLocalFonts()
This commit is contained in:
parent
780a949a73
commit
f0927add74
@ -46,9 +46,11 @@
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
||||
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
||||
this.systemFonts = [[defaultFontFamily, defaultFontFamily + " (default)"], ...localFonts]
|
||||
if (window.queryLocalFonts !== undefined) {
|
||||
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
||||
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
||||
this.systemFonts = [[defaultFontFamily, defaultFontFamily + " (default)"], ...localFonts]
|
||||
}
|
||||
|
||||
window.addEventListener("keydown", this.onKeyDown);
|
||||
this.$refs.keymapSelector.focus()
|
||||
|
Loading…
Reference in New Issue
Block a user