From 8e4bf3b4099daaf617f4546a992748ae4f890586 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 3 Jan 2024 20:40:52 +0100 Subject: [PATCH] linting changes --- src/lib/components/ServiceCard.svelte | 56 ++++++++++++++++++++++----- src/routes/services/+page.svelte | 23 ++++++----- 2 files changed, 58 insertions(+), 21 deletions(-) diff --git a/src/lib/components/ServiceCard.svelte b/src/lib/components/ServiceCard.svelte index 6e1997a..2f0c1fd 100644 --- a/src/lib/components/ServiceCard.svelte +++ b/src/lib/components/ServiceCard.svelte @@ -6,9 +6,13 @@ import { slide } from 'svelte/transition'; import { IconType, type Service } from '$lib/types/data-types'; import { Skeleton } from '$lib/components/ui/skeleton'; - import type {Heartbeat} from "$lib/types/uptime-kuma-types"; + import type { Heartbeat } from '$lib/types/uptime-kuma-types'; - let { service, icons, monitor } = $props<{ service: Service; icons: Array, monitor: Heartbeat }>(); + let { service, icons, monitor } = $props<{ + service: Service; + icons: Array; + monitor: Heartbeat; + }>(); let status = $state(4); @@ -32,9 +36,9 @@ } $effect(() => { - if (typeof monitor !== "undefined") { + if (typeof monitor !== 'undefined') { if (monitor.monitorID == 9) { - console.log("Vaultwarden: ", monitor.status) + console.log('Vaultwarden: ', monitor.status); } status = monitor.status; } @@ -57,7 +61,15 @@
@@ -96,11 +108,37 @@ {/if}
-

- {status == 0 ? 'Offline' : status == 1 ? 'Online' : status == 2 ? 'Pending' : status == 3 ? 'Maint.' : 'Loading'} + {status == 0 + ? 'text-offline' + : status == 1 + ? 'text-online' + : status == 2 + ? 'text-pending' + : status == 3 + ? 'text-maintenance' + : 'text-maintenance'}" + > + {status == 0 + ? 'Offline' + : status == 1 + ? 'Online' + : status == 2 + ? 'Pending' + : status == 3 + ? 'Maint.' + : 'Loading'}

{service.desc}

diff --git a/src/routes/services/+page.svelte b/src/routes/services/+page.svelte index 4934ec2..7ed1dab 100644 --- a/src/routes/services/+page.svelte +++ b/src/routes/services/+page.svelte @@ -3,14 +3,14 @@