mirror of
https://github.com/lukaszraczylo/ghtracker.git
synced 2026-10-15 01:07:40 +00:00
feat(ui): show alert action buttons and status chips
Alerts that match a configured action get a button labelled from the config. A confirm dialog opens first when the action defines confirm text. After a press the UI posts the alert, reloads the state through the existing poll path and shows the reported status as a chip, with an anchor when the status carries a link. The alert dialog comes from reka-ui through the usual shadcn-vue wrappers.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import AgeMeter from '@/components/AgeMeter.vue'
|
||||
import RowActions from '@/components/RowActions.vue'
|
||||
import { ageSince, isZeroTime, secondsSince, shorten } from '@/lib/format'
|
||||
import { iconFor } from '@/lib/kinds'
|
||||
import type { Row } from '@/lib/types'
|
||||
@@ -33,6 +34,7 @@ const ratio = computed(() => secondsSince(props.row.since, props.nowMs) / props.
|
||||
<p class="text-muted-foreground mt-0.5 text-sm wrap-anywhere">
|
||||
{{ shorten(row.detail, 120) }}
|
||||
</p>
|
||||
<RowActions v-if="row.actions?.length" :row="row" />
|
||||
</div>
|
||||
<div
|
||||
class="col-start-2 flex items-center gap-3 sm:col-start-auto sm:flex-col sm:items-end sm:gap-1.5 sm:pt-0.5"
|
||||
|
||||
Reference in New Issue
Block a user