refactor(ui): CardHeading primitive for icon+title card/dialog headings (DRY pattern sweep)
The icon+title v-card-title heading (d-flex align-center + gap + <v-icon size=small> + <span>) was hand-rolled identically in 13 cards/dialogs (15 heading instances). Consolidate to <CardHeading icon title> (components/common) with an iconColor prop (error headings) and a default slot for trailing content (spacer+actions, inline status chip). Adopted everywhere the pattern appears — all-or-nothing per the hardened DRY process. Over-DRY guard: plain text-only <v-card-title> one-liners are NOT this pattern and stay; DownloadDetailModal leads with a status CHIP (not an icon), a different concept, left alone. §8b: the only remaining d-flex align-center v-card-title is that intentional variant. Catalog updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<v-card class="fc-danger-zone mt-8" variant="outlined">
|
||||
<v-card-title class="d-flex align-center" style="gap: 10px;">
|
||||
<v-icon icon="mdi-alert-octagon" color="error" size="small" />
|
||||
<span>Danger zone</span>
|
||||
</v-card-title>
|
||||
<CardHeading icon="mdi-alert-octagon" icon-color="error" title="Danger zone" />
|
||||
<v-card-text>
|
||||
<p class="text-body-2 fc-muted mb-4">
|
||||
Cascade-delete this artist and every image, source, post, and
|
||||
@@ -37,6 +34,7 @@ import { useRouter } from 'vue-router'
|
||||
|
||||
import DestructiveConfirmModal from '../modal/DestructiveConfirmModal.vue'
|
||||
import { useAdminStore } from '../../stores/admin.js'
|
||||
import CardHeading from '../common/CardHeading.vue'
|
||||
|
||||
const props = defineProps({
|
||||
slug: { type: String, required: true },
|
||||
|
||||
Reference in New Issue
Block a user