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 <noreply@anthropic.com>
This commit is contained in:
@@ -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<unknown>) {
|
||||
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() {
|
||||
<p v-if="cards.loading && !cards.loaded" class="muted">Loading…</p>
|
||||
|
||||
<ul v-else-if="sortedCards.length" class="cards">
|
||||
<CardRow
|
||||
v-for="card in sortedCards"
|
||||
:key="card.id"
|
||||
:card="card"
|
||||
@delete="run(cards.remove(card))"
|
||||
/>
|
||||
<CardRow v-for="card in sortedCards" :key="card.id" :card="card" />
|
||||
</ul>
|
||||
|
||||
<form class="kanban__new form--new-card" @submit.prevent="onCreate">
|
||||
|
||||
Reference in New Issue
Block a user