flotilla/src/app/components/RelaySettingsHealthCheck.svelte

27 lines
759 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"
2026-03-19 20:26:52 +00:00
import type {HealthCheck} from "@app/util/health"
import {applyHealthCheck} from "@app/util/health"
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>
<div class="card2 card2-sm bg-alt flex justify-between">
<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="btn btn-neutral btn-sm" onclick={apply}>
<Icon icon={Stars} />
2026-03-19 20:26:52 +00:00
{healthCheck.action}
2026-03-11 22:48:36 +00:00
</Button>
</div>