diff --git a/ui/src/App.vue b/ui/src/App.vue index 98c6592..cbfd175 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -52,7 +52,7 @@ export default class App extends Vue { image_modal: ImageModal; }; - public mounted(): void { + public mounted() { this.$advent22.api_get_string("days/date", (date: string) => { this.date = date; }); @@ -65,7 +65,7 @@ export default class App extends Vue { ); } - private open_calendar_door(image_src: string): void { + private open_calendar_door(image_src: string) { this.$refs.image_modal.show_src(image_src); } } diff --git a/ui/src/components/CalendarDoor.vue b/ui/src/components/CalendarDoor.vue index f5d5682..595804b 100644 --- a/ui/src/components/CalendarDoor.vue +++ b/ui/src/components/CalendarDoor.vue @@ -17,7 +17,7 @@ export default class CalendarDoor extends Vue { return this.$advent22.api_url("days/image/" + this.day); } - private on_click(): void { + private on_click() { this.$advent22.api_get_blob("days/image/" + this.day, (data) => { this.$emit("openDoor", data); }); diff --git a/ui/src/components/ImageModal.vue b/ui/src/components/ImageModal.vue index 9bbfb32..ee0aedf 100644 --- a/ui/src/components/ImageModal.vue +++ b/ui/src/components/ImageModal.vue @@ -17,17 +17,17 @@ export default class ImageModal extends Vue { private active = false; public image_src = ""; - public created(): void { + public created() { window.addEventListener("keydown", (e) => { if (e.key == "Escape") this.set_active(false); }); } - public set_active(state: boolean): void { + public set_active(state: boolean) { this.active = state; } - public show_src(src: string): void { + public show_src(src: string) { this.image_src = src; this.set_active(true); } diff --git a/ui/src/components/LoginModal.vue b/ui/src/components/LoginModal.vue index 815529b..2835935 100644 --- a/ui/src/components/LoginModal.vue +++ b/ui/src/components/LoginModal.vue @@ -44,20 +44,20 @@ export default class LoginModal extends Vue { private username = ""; private password = ""; - public created(): void { + public created() { window.addEventListener("keydown", (e) => { if (e.key == "Escape") this.set_active(false); }); } - public set_active(state: boolean): void { + public set_active(state: boolean) { this.active = state; this.username = ""; this.password = ""; } - private submit(): void { + private submit() { this.$advent22.set_api_auth(this.username, this.password); this.set_active(false); } diff --git a/ui/src/plugins/advent22.ts b/ui/src/plugins/advent22.ts index e53ac30..ab678d3 100644 --- a/ui/src/plugins/advent22.ts +++ b/ui/src/plugins/advent22.ts @@ -46,7 +46,7 @@ export class Advent22 { endpoint: string, on_success: (data: T) => void, responseType: ResponseType = "json", - ): void { + ) { const req_data = { auth: this.api_auth, responseType: responseType, @@ -60,7 +60,7 @@ export class Advent22 { public api_get_blob( endpoint: string, on_success: (data: string) => void, - ): void { + ) { this.api_get( endpoint, (data: Blob) => { @@ -81,7 +81,7 @@ export class Advent22 { public api_get_string( endpoint: string, on_success: (data: string) => void, - ): void { + ) { this.api_get( endpoint, (data: string) => { @@ -93,7 +93,7 @@ export class Advent22 { public api_get_number( endpoint: string, on_success: (data: number) => void, - ): void { + ) { this.api_get( endpoint, (data: number) => {