From c654a5a3227c6eeed6f22412006e0c1c50e193ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Thu, 26 Oct 2023 22:28:59 +0000 Subject: [PATCH] fix linter errors --- ui/src/components/Dashboard.vue | 3 +-- ui/src/components/DashboardInfo.vue | 12 +++++----- ui/src/components/ImageCarousel.vue | 12 +++++----- ui/src/components/Message.vue | 6 ++--- ui/src/components/Model.ts | 2 +- ui/src/components/TickerBar.vue | 9 +++----- ui/src/components/calendar/Calendar.vue | 12 +++++----- .../components/calendar/CalendarCarousel.vue | 4 ++-- ui/src/components/calendar/CalendarModel.ts | 6 ++--- ui/src/components/calendar/EventDate.vue | 10 ++++---- ui/src/components/calendar/EventItem.vue | 23 ++++++------------- ui/src/components/calendar/EventModel.ts | 12 ++++------ ui/src/components/title/Clock.vue | 4 ++-- ui/src/components/title/THWLogo.vue | 6 ++--- ui/src/components/title/TitleBar.vue | 2 +- ui/src/d.ts/shims-ovdashboard.d.ts | 5 ++-- ui/src/d.ts/shims-tsx.d.ts | 4 ++-- ui/src/d.ts/shims-vue.d.ts | 6 ++--- ui/src/d.ts/shims-vuetify.d.ts | 6 ++--- ui/src/plugins/ovdashboard.ts | 22 ++++++++---------- ui/src/plugins/vuetify.ts | 4 ++-- 21 files changed, 76 insertions(+), 94 deletions(-) diff --git a/ui/src/components/Dashboard.vue b/ui/src/components/Dashboard.vue index 88b6683..95ae2d0 100644 --- a/ui/src/components/Dashboard.vue +++ b/ui/src/components/Dashboard.vue @@ -18,5 +18,4 @@ import { Component, Vue } from "vue-property-decorator"; export default class Dashboard extends Vue {} - \ No newline at end of file + diff --git a/ui/src/components/DashboardInfo.vue b/ui/src/components/DashboardInfo.vue index 28247c1..072a75b 100644 --- a/ui/src/components/DashboardInfo.vue +++ b/ui/src/components/DashboardInfo.vue @@ -18,10 +18,10 @@ import { Component, Vue } from "@/ovd-vue"; @Component export default class DashboardInfo extends Vue { - private server_host = "https://oekzident.de"; - private server_name = "OEKZident"; - private version = "0.0.1"; - private lan_ip = "0.0.0.0"; + public server_host = "https://oekzident.de"; + public server_name = "OEKZident"; + public version = "0.0.1"; + public lan_ip = "0.0.0.0"; public created(): void { super.created(); @@ -43,7 +43,7 @@ export default class DashboardInfo extends Vue { (data) => { this.server_host = data.host; this.server_name = data.name; - } + }, ); // Update Version @@ -57,4 +57,4 @@ export default class DashboardInfo extends Vue { }); } } - \ No newline at end of file + diff --git a/ui/src/components/ImageCarousel.vue b/ui/src/components/ImageCarousel.vue index dc5c3de..328f693 100644 --- a/ui/src/components/ImageCarousel.vue +++ b/ui/src/components/ImageCarousel.vue @@ -22,10 +22,10 @@ import { Component, Vue } from "@/ovd-vue"; @Component export default class ImageCarousel extends Vue { - private urls: string[] = require("@/assets/image_testdata.json"); - private height = 300; - private contain = false; - private speed = 10000; + public urls: string[] = require("@/assets/image_testdata.json"); + public height = 300; + public contain = false; + public speed = 10000; public created(): void { super.created(); @@ -39,7 +39,7 @@ export default class ImageCarousel extends Vue { // Update Images this.$ovdashboard.api_get_list("image/list", (names) => { this.urls = names.map((name: string) => - this.$ovdashboard.api_url(`image/get/${name}`) + this.$ovdashboard.api_url(`image/get/${name}`), ); }); @@ -71,4 +71,4 @@ export default class ImageCarousel extends Vue { } } } - \ No newline at end of file + diff --git a/ui/src/components/Message.vue b/ui/src/components/Message.vue index 0a0c745..a660b2e 100644 --- a/ui/src/components/Message.vue +++ b/ui/src/components/Message.vue @@ -7,7 +7,7 @@ import { Component, Vue } from "@/ovd-vue"; @Component export default class Message extends Vue { - private html = require("@/assets/message_testdata.json"); + public html = require("@/assets/message_testdata.json"); public created(): void { super.created(); @@ -21,7 +21,7 @@ export default class Message extends Vue { // Update Message this.$ovdashboard.api_get_string( "text/get/html/message", - (data) => (this.html = data) + (data) => (this.html = data), ); } } @@ -59,4 +59,4 @@ div:deep() { font-weight: bold; } } - \ No newline at end of file + diff --git a/ui/src/components/Model.ts b/ui/src/components/Model.ts index 53ca388..016e87d 100644 --- a/ui/src/components/Model.ts +++ b/ui/src/components/Model.ts @@ -5,7 +5,7 @@ export class Model { // source: https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0?permalink_comment_id=2775538#gistcomment-2775538 let hash = 0; for (let i = 0; i < str.length; i++) - hash = Math.imul(31, hash) + str.charCodeAt(i) | 0; + hash = (Math.imul(31, hash) + str.charCodeAt(i)) | 0; return new Uint32Array([hash])[0].toString(36); } diff --git a/ui/src/components/TickerBar.vue b/ui/src/components/TickerBar.vue index 04c11e3..6538ce1 100644 --- a/ui/src/components/TickerBar.vue +++ b/ui/src/components/TickerBar.vue @@ -15,17 +15,14 @@ import Color from "color"; @Component export default class TickerBar extends Vue { - private content = "

changeme

"; + public content = "

changeme

"; - private color = "primary"; - - @Ref("content") - private readonly _content!: HTMLDivElement; + public color = "primary"; @Ref("marquee") private readonly _marquee!: HTMLSpanElement; - private get is_dark(): boolean { + public get is_dark(): boolean { return this.footer_color.isDark(); } diff --git a/ui/src/components/calendar/Calendar.vue b/ui/src/components/calendar/Calendar.vue index e3142ae..3b87ff2 100644 --- a/ui/src/components/calendar/Calendar.vue +++ b/ui/src/components/calendar/Calendar.vue @@ -4,11 +4,11 @@ {{ title }} @@ -16,8 +16,8 @@ @@ -37,4 +37,4 @@ export default class Calendar extends Vue { .v-list .v-divider { border-color: rgba(0, 0, 0, 0.25); } - \ No newline at end of file + diff --git a/ui/src/components/calendar/CalendarCarousel.vue b/ui/src/components/calendar/CalendarCarousel.vue index aaeee8e..56e7807 100644 --- a/ui/src/components/calendar/CalendarCarousel.vue +++ b/ui/src/components/calendar/CalendarCarousel.vue @@ -29,7 +29,7 @@ export default class CalendarCarousel extends Vue { private interval?: number; private data: CalendarData[] = require("@/assets/calendar_testdata.json"); - private speed = 10000; + public speed = 10000; @Ref("main") private readonly _main?: Vue; @@ -98,7 +98,7 @@ export default class CalendarCarousel extends Vue { this.interval = setInterval(this.update_height, 10000); } - private get calendars(): CalendarModel[] { + public get calendars(): CalendarModel[] { const arr = []; for (const json_data of this.data) { diff --git a/ui/src/components/calendar/CalendarModel.ts b/ui/src/components/calendar/CalendarModel.ts index 5fb6423..74d9b1f 100644 --- a/ui/src/components/calendar/CalendarModel.ts +++ b/ui/src/components/calendar/CalendarModel.ts @@ -13,11 +13,11 @@ export class CalendarModel extends Model { public constructor(json_data: CalendarData) { super(); - this.title = json_data.title + this.title = json_data.title; this.events = []; for (const event_data of json_data.events) { - this.events.push(new EventModel(event_data)) + this.events.push(new EventModel(event_data)); } } -} \ No newline at end of file +} diff --git a/ui/src/components/calendar/EventDate.vue b/ui/src/components/calendar/EventDate.vue index 6fcd588..044ee11 100644 --- a/ui/src/components/calendar/EventDate.vue +++ b/ui/src/components/calendar/EventDate.vue @@ -17,23 +17,23 @@ - \ No newline at end of file + diff --git a/ui/src/components/calendar/EventModel.ts b/ui/src/components/calendar/EventModel.ts index 2558fd3..6bf732b 100644 --- a/ui/src/components/calendar/EventModel.ts +++ b/ui/src/components/calendar/EventModel.ts @@ -19,13 +19,11 @@ export class EventModel extends Model { this.summary = json_data.summary; this.description = json_data.description; - this.start = DateTime - .fromISO(json_data.dtstart) - .setLocale(navigator.language); - const end = DateTime - .fromISO(json_data.dtend) - .setLocale(navigator.language); + this.start = DateTime.fromISO(json_data.dtstart).setLocale( + navigator.language, + ); + const end = DateTime.fromISO(json_data.dtend).setLocale(navigator.language); this.duration = end.diff(this.start); } -} \ No newline at end of file +} diff --git a/ui/src/components/title/Clock.vue b/ui/src/components/title/Clock.vue index 6c9670d..6c3d95a 100644 --- a/ui/src/components/title/Clock.vue +++ b/ui/src/components/title/Clock.vue @@ -3,12 +3,12 @@