Linting changes
This commit is contained in:
parent
abea3f1be9
commit
3525fdfcd1
6 changed files with 51 additions and 59 deletions
src/lib/components
|
@ -42,14 +42,13 @@
|
|||
if (typeof monitor !== 'undefined') {
|
||||
status = monitor.status;
|
||||
}
|
||||
if (icons.length != 0 && typeof server.icon !== "undefined") {
|
||||
if (icons.length != 0 && typeof server.icon !== 'undefined') {
|
||||
const rootSplit = server.icon.split('/');
|
||||
const root = rootSplit[rootSplit.length - 1];
|
||||
|
||||
if (server.iconType === IconType.SVG) {
|
||||
checkForImage(server);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (icons.includes(`${root}-36.${server.iconType}`)) {
|
||||
img_source = `${server.icon}-36.${server.iconType}`;
|
||||
} else {
|
||||
|
@ -62,7 +61,8 @@
|
|||
|
||||
<div
|
||||
class="flex h-48 w-[28rem] flex-col gap-y-2 rounded-xl border-t-4
|
||||
{status == 99 ? 'border-primary'
|
||||
{status == 99
|
||||
? 'border-primary'
|
||||
: status == 0
|
||||
? 'border-offline'
|
||||
: status == 1
|
||||
|
@ -80,7 +80,7 @@
|
|||
on:mouseover={() => (hover.title = true)}
|
||||
on:mouseleave={() => (hover.title = false)}
|
||||
>
|
||||
{#if typeof server.icon !== "undefined"}
|
||||
{#if typeof server.icon !== 'undefined'}
|
||||
{#if img_source != ''}
|
||||
<img
|
||||
width="24px"
|
||||
|
@ -92,11 +92,7 @@
|
|||
<Skeleton class="h-6 w-6 rounded-full" />
|
||||
{/if}
|
||||
{:else}{/if}
|
||||
<a
|
||||
href={server.href}
|
||||
class="font-bold {!hover.title || 'text-secondary'}"
|
||||
>{server.name}</a
|
||||
>
|
||||
<a href={server.href} class="font-bold {!hover.title || 'text-secondary'}">{server.name}</a>
|
||||
{#if hover.title}
|
||||
<div
|
||||
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
|
||||
|
@ -110,39 +106,39 @@
|
|||
{/if}
|
||||
</div>
|
||||
|
||||
{#if typeof server.id !== "undefined"}
|
||||
{#if typeof server.id !== 'undefined'}
|
||||
<h1
|
||||
class="w-16 rounded-md border-b-2
|
||||
class="w-16 rounded-md border-b-2
|
||||
{status == 0
|
||||
? 'border-offline'
|
||||
: status == 1
|
||||
? 'border-online'
|
||||
: status == 2
|
||||
? 'border-pending'
|
||||
: status == 3
|
||||
? 'border-maintenance'
|
||||
: 'border-maintenance'}
|
||||
? 'border-offline'
|
||||
: status == 1
|
||||
? 'border-online'
|
||||
: status == 2
|
||||
? 'border-pending'
|
||||
: status == 3
|
||||
? 'border-maintenance'
|
||||
: 'border-maintenance'}
|
||||
text-center text-sm
|
||||
{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'}
|
||||
</h1>
|
||||
? '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'}
|
||||
</h1>
|
||||
{/if}
|
||||
</div>
|
||||
<p class="text-wrap text-center text-sm">{server.desc}</p>
|
||||
|
|
|
@ -87,11 +87,7 @@
|
|||
<Skeleton class="h-6 w-6 rounded-full" />
|
||||
{/if}
|
||||
{:else}{/if}
|
||||
<a
|
||||
href={service.href}
|
||||
class="font-bold {!hover.title || 'text-secondary'}"
|
||||
>{service.name}</a
|
||||
>
|
||||
<a href={service.href} class="font-bold {!hover.title || 'text-secondary'}">{service.name}</a>
|
||||
{#if hover.title}
|
||||
<div
|
||||
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue