fix(ui): align alert times in a right column and lift the body contrast
This commit is contained in:
1 parent
93442b74b1
commit
bd090e07a3
2 files changed
+86
-88
No files matched your search
@@ -54,27 +54,25 @@ function failedDeliveries(alert: OperatorAlert): number {
|
||||
</Button>
|
||||
<section v-for="group in groups" :key="group.severity" class="border-b p-3 last:border-b-0">
|
||||
<h3 class="mb-2 text-sm font-semibold">{{ group.label }}</h3>
|
||||
<ul class="grid gap-3">
|
||||
<ul class="grid gap-4">
|
||||
<li v-for="alert in group.alerts" :key="alert.id" class="flex items-start justify-between gap-2">
|
||||
<component
|
||||
:is="alert.link ? RouterLink : 'div'"
|
||||
v-bind="alert.link ? { to: alert.link } : {}"
|
||||
class="grid min-w-0 gap-1"
|
||||
class="grid min-w-0 flex-1 gap-1"
|
||||
:class="alert.link && 'group'"
|
||||
@click="alert.link && (open = false)"
|
||||
>
|
||||
<span class="flex flex-wrap items-baseline gap-x-2">
|
||||
<span class="text-sm font-medium group-hover:underline">{{ alert.title }}</span>
|
||||
<time
|
||||
class="shrink-0 text-xs whitespace-nowrap text-fg-subtle"
|
||||
:datetime="alert.first_raised"
|
||||
:title="new Date(alert.first_raised).toLocaleString()"
|
||||
>{{ ago(alert.first_raised) }}</time
|
||||
>
|
||||
</span>
|
||||
<span v-if="alert.body" class="text-xs text-fg-subtle">{{ alert.body }}</span>
|
||||
<span class="text-sm font-medium group-hover:underline">{{ alert.title }}</span>
|
||||
<span v-if="alert.body" class="text-[13px] leading-snug text-fg-muted">{{ alert.body }}</span>
|
||||
<span v-if="failedDeliveries(alert)" class="text-xs text-warn">Webhook delivery failed.</span>
|
||||
</component>
|
||||
<time
|
||||
class="mt-0.5 shrink-0 text-xs whitespace-nowrap text-fg-subtle"
|
||||
:datetime="alert.first_raised"
|
||||
:title="new Date(alert.first_raised).toLocaleString()"
|
||||
>{{ ago(alert.first_raised) }}</time
|
||||
>
|
||||
<Button variant="ghost" size="icon-sm" class="-mr-2 shrink-0" :aria-label="`Dismiss ${alert.title}`" title="Dismiss" @click="dismiss(alert)"><X /></Button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in new issue
Block a user