diff --git a/ui/src/components/LoginModal.vue b/ui/src/components/LoginModal.vue index 399f274..b2d0612 100644 --- a/ui/src/components/LoginModal.vue +++ b/ui/src/components/LoginModal.vue @@ -65,10 +65,6 @@ export default class extends Vue { public username = ""; public password = ""; - declare $refs: { - username_input: HTMLInputElement | unknown; - }; - private on_keydown(e: KeyboardEvent) { if (e.key == "Enter") this.submit(); else if (e.key == "Escape") this.cancel(); @@ -78,9 +74,8 @@ export default class extends Vue { window.addEventListener("keydown", this.on_keydown); this.$nextTick(() => { - if (this.$refs.username_input instanceof HTMLInputElement) { - this.$refs.username_input.focus(); - } + if (!(this.$refs.username_input instanceof HTMLElement)) return; + this.$refs.username_input.focus(); }); } diff --git a/ui/src/components/editor/PreviewDoor.vue b/ui/src/components/editor/PreviewDoor.vue index de58486..ab8db18 100644 --- a/ui/src/components/editor/PreviewDoor.vue +++ b/ui/src/components/editor/PreviewDoor.vue @@ -43,10 +43,6 @@ export default class extends Vue { public day_str = ""; public editing = false; - declare $refs: { - day_input: HTMLInputElement | unknown; - }; - private toggle_editing() { this.day_str = String(this.door.day); this.editing = !this.editing;