From d1de9f50f5fb2e88b290f2bb1656c0cbb0eaa24b Mon Sep 17 00:00:00 2001 From: Aneurin Barker Snook Date: Sat, 5 Sep 2026 00:54:36 +0100 Subject: [PATCH] Remove the per-row delete button from Explore's cards Matches KanbanCard, which never had one -- deleting a card lives on its own view now (CardManageMenu's "Delete card"), reachable by clicking through from either list. Cleaned up what that leaves unused: the cards store's remove() (its only caller), and .card-row__delete's styling. Co-Authored-By: Claude Sonnet 5 --- web/src/components/CardRow.vue | 5 ----- web/src/stores/cards.ts | 6 ------ web/src/style.css | 16 ---------------- web/src/views/ProjectExploreView.vue | 18 +----------------- 4 files changed, 1 insertion(+), 44 deletions(-) diff --git a/web/src/components/CardRow.vue b/web/src/components/CardRow.vue index a276292..d8cdad0 100644 --- a/web/src/components/CardRow.vue +++ b/web/src/components/CardRow.vue @@ -2,7 +2,6 @@ import type { Card } from '../types' defineProps<{ card: Card }>() -const emit = defineEmits<{ delete: [] }>() diff --git a/web/src/stores/cards.ts b/web/src/stores/cards.ts index 49fe459..850b50b 100644 --- a/web/src/stores/cards.ts +++ b/web/src/stores/cards.ts @@ -56,11 +56,6 @@ export const useCardsStore = defineStore('cards', () => { const setComplete = (card: Card, complete: boolean) => patch(card, { complete }) - async function remove(card: Card): Promise { - await apiRequest(`/cards/${card.id}`, { method: 'DELETE', auth: true }) - cards.value = cards.value.filter((c) => c.id !== card.id) - } - function reset(): void { cards.value = [] projectId.value = null @@ -76,7 +71,6 @@ export const useCardsStore = defineStore('cards', () => { load, add, setComplete, - remove, reset, } }) diff --git a/web/src/style.css b/web/src/style.css index f5b0bdc..c66c1ea 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -594,22 +594,6 @@ h1 { font-style: italic; } -.card-row__delete { - flex: none; - border: none; - background: none; - color: var(--muted); - cursor: pointer; - font-size: 1rem; - padding: 0.2rem 0.4rem; - border-radius: var(--radius-sm); -} - -.card-row__delete:hover { - color: var(--error); - background: var(--bg); -} - /* --- project detail: header, inline title, manage menu ----------------- */ /* Grid, not flex, so the mobile reflow below is one explicit statement of diff --git a/web/src/views/ProjectExploreView.vue b/web/src/views/ProjectExploreView.vue index ea97e1c..52cdbf7 100644 --- a/web/src/views/ProjectExploreView.vue +++ b/web/src/views/ProjectExploreView.vue @@ -24,17 +24,6 @@ const sortedCards = computed(() => [...cards.cards].sort((a, b) => a.text.localeCompare(b.text, undefined, { sensitivity: 'base' })), ) -/** Run a store mutation, surfacing failures and resyncing from the server. */ -async function run(op: Promise) { - actionError.value = null - try { - await op - } catch (e) { - actionError.value = e instanceof ApiError ? e.message : 'Something went wrong.' - if (cards.projectId !== null) await cards.load(cards.projectId) - } -} - async function onCreate() { submitting.value = true actionError.value = null @@ -58,12 +47,7 @@ async function onCreate() {

Loading…

    - +