mirror of
https://github.com/heyman/heynote.git
synced 2024-10-07 02:22:41 +02: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() {
|
async mounted() {
|
||||||
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
if (window.queryLocalFonts !== undefined) {
|
||||||
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
let localFonts = [... new Set((await window.queryLocalFonts()).map(f => f.family))].filter(f => f !== "Hack")
|
||||||
this.systemFonts = [[defaultFontFamily, defaultFontFamily + " (default)"], ...localFonts]
|
localFonts = [...new Set(localFonts)].map(f => [f, f])
|
||||||
|
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