mirror of
https://github.com/khoaliber/dockhand.git
synced 2026-03-09 21:29:04 +00:00
Initial commit
This commit is contained in:
47
routes/dashboard/dashboard-status-icons.svelte
Normal file
47
routes/dashboard/dashboard-status-icons.svelte
Normal file
@@ -0,0 +1,47 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
ShieldCheck,
|
||||
Activity,
|
||||
WifiOff,
|
||||
CircleArrowUp,
|
||||
CircleFadingArrowUp
|
||||
} from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
online: boolean;
|
||||
scannerEnabled: boolean;
|
||||
collectActivity: boolean;
|
||||
updateCheckEnabled?: boolean;
|
||||
updateCheckAutoUpdate?: boolean;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
let { online, scannerEnabled, collectActivity, updateCheckEnabled = false, updateCheckAutoUpdate = false, compact = false }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="{compact ? 'flex items-center gap-1 shrink-0' : 'flex items-center gap-1.5 shrink-0'}">
|
||||
{#if updateCheckEnabled}
|
||||
<span title={updateCheckAutoUpdate ? "Auto-update enabled" : "Update check enabled (notify only)"}>
|
||||
{#if updateCheckAutoUpdate}
|
||||
<CircleArrowUp class="{compact ? 'w-3.5 h-3.5 glow-green-sm' : 'w-4 h-4 glow-green'} text-green-500" />
|
||||
{:else}
|
||||
<CircleFadingArrowUp class="{compact ? 'w-3.5 h-3.5 glow-green-sm' : 'w-4 h-4 glow-green'} text-green-500" />
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{#if scannerEnabled}
|
||||
<span title="Vulnerability scanning enabled">
|
||||
<ShieldCheck class="{compact ? 'w-3.5 h-3.5 glow-green-sm' : 'w-4 h-4 glow-green'} text-green-500" />
|
||||
</span>
|
||||
{/if}
|
||||
{#if collectActivity}
|
||||
<span title="Activity collection enabled">
|
||||
<Activity class="{compact ? 'w-3.5 h-3.5 glow-amber-sm' : 'w-4 h-4 glow-amber'} text-amber-500" />
|
||||
</span>
|
||||
{/if}
|
||||
{#if !online && compact}
|
||||
<span title="Offline">
|
||||
<WifiOff class="w-3.5 h-3.5 text-red-500 shrink-0" />
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user