From 4fe8bf1847b1fc7a02a87a93e624d0de89cace98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 17 Jan 2023 14:28:11 +0000 Subject: [PATCH] remove ": void" --- ui/src/App.vue | 4 ++-- ui/src/components/CalendarDoor.vue | 2 +- ui/src/components/ImageModal.vue | 6 +++--- ui/src/components/LoginModal.vue | 6 +++--- ui/src/plugins/advent22.ts | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index 199b654..fb19056 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -48,7 +48,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; }); @@ -61,7 +61,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) => {