fix(webui): alerts drop UI-explaining prose and align Dismiss with the title

This commit is contained in:
sam committed 2026-10-13 17:14:43 +11:00
1 parent 9eabc624ee
commit 4fd6efb7f0
3 files changed
+70 -75

No files matched your search

+4 -9
View File
@@ -74,19 +74,14 @@ function failedDeliveries(alert: OperatorAlert): number {
<h3 class="mb-2 text-xs font-medium text-fg-subtle">{{ group.label }}</h3>
<ul class="grid gap-3">
<li v-for="alert in group.alerts" :key="alert.id" class="grid gap-1">
<div class="flex items-start justify-between gap-2">
<div class="flex items-baseline justify-between gap-2">
<RouterLink v-if="alert.link" :to="alert.link" class="text-sm font-medium hover:underline" @click="open = false">
{{ alert.title }}
{{ alert.title }}<template v-if="alert.count > 1"> ×{{ alert.count }}</template>
</RouterLink>
<span v-else class="text-sm font-medium">{{ alert.title }}</span>
<Button variant="ghost" size="xs" class="shrink-0" @click="dismiss(alert)">Dismiss</Button>
<span v-else class="text-sm font-medium">{{ alert.title }}<template v-if="alert.count > 1"> ×{{ alert.count }}</template></span>
<Button variant="ghost" size="xs" class="-mr-2 shrink-0" @click="dismiss(alert)">Dismiss</Button>
</div>
<p v-if="alert.body" class="text-xs text-fg-subtle">{{ alert.body }}</p>
<p class="text-xs text-fg-subtle">
<template v-if="alert.count > 1">Seen {{ alert.count }} times. </template>
<template v-if="alert.condition">Clears when fixed; dismissing snoozes it.</template>
<template v-else>Stays until dismissed.</template>
</p>
<p v-if="failedDeliveries(alert)" class="text-xs text-warn">Webhook delivery failed.</p>
</li>
</ul>