Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
+34 -6
View File
@@ -1,18 +1,46 @@
<script lang="ts">
import type { PlutoniumVersion } from '$lib/plutonium.js';
import { uiNow } from '$ui/stores/servers.js';
let { name, version, after, ready = true }: { name: string; version?: PlutoniumVersion; after?: string | null; ready?: boolean } = $props();
const fresh = $derived(ready && version?.checked_at && $uiNow - Date.parse(version.checked_at) < 3_600_000 && (!after || version.checked_at > after));
let {
name,
version,
after,
ready = true
}: {
name: string;
version?: PlutoniumVersion;
after?: string | null;
ready?: boolean;
} = $props();
const fresh = $derived(
ready &&
version?.checked_at &&
$uiNow - Date.parse(version.checked_at) < 3_600_000 &&
(!after || version.checked_at > after)
);
const revision = $derived(fresh ? version?.revision : null);
const outdated = $derived(fresh && version?.update_status === 'outdated');
</script>
<a class:outdated href={`/maintenance?kind=updates&server=${encodeURIComponent(name)}`} title="View Plutonium updates and verification">
<a
class:outdated
href={`/maintenance?kind=updates&server=${encodeURIComponent(name)}`}
title="View Plutonium updates and verification"
>
Plutonium {revision ? `r${revision}` : 'unverified'}{outdated ? ' · Update available' : ''}
</a>
<style>
a { font-size: var(--text-xs); color: var(--text-secondary); text-decoration: none; }
a:hover { color: var(--accent-primary-hover); text-decoration: underline; }
.outdated { color: var(--state-warning); }
a {
font-size: var(--text-xs);
color: var(--text-secondary);
text-decoration: none;
}
a:hover {
color: var(--accent-primary-hover);
text-decoration: underline;
}
.outdated {
color: var(--state-warning);
}
</style>