flotilla/src/app/components/RelaySettingsHealthCheck.svelte

28 lines
813 B
Svelte
Raw Normal View History

2026-03-11 22:48:36 +00:00
<script lang="ts">
import Stars from "@assets/icons/stars.svg?dataurl"
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import Card from "@lib/components/Card.svelte"
2026-06-08 21:14:40 +00:00
import type {HealthCheck} from "@app/healthChecks"
import {applyHealthCheck} from "@app/healthChecks"
2026-03-19 20:26:52 +00:00
type Props = {
healthCheck: HealthCheck
}
const {healthCheck}: Props = $props()
2026-03-11 22:48:36 +00:00
2026-03-19 20:26:52 +00:00
const apply = () => applyHealthCheck(healthCheck)
2026-03-11 22:48:36 +00:00
</script>
<Card sm class="bg-surface flex justify-between">
2026-03-11 22:48:36 +00:00
<div class="flex flex-col gap-1">
2026-03-19 20:26:52 +00:00
<strong>{healthCheck.title}</strong>
<p class="text-sm">{healthCheck.description}</p>
2026-03-11 22:48:36 +00:00
</div>
<Button class="button button-neutral button-sm" onclick={apply}>
2026-03-11 22:48:36 +00:00
<Icon icon={Stars} />
2026-03-19 20:26:52 +00:00
{healthCheck.action}
2026-03-11 22:48:36 +00:00
</Button>
</Card>