fix(subs): stop the lock/reload on source actions + regroup the row buttons
Lock/reload: every inline source action (check / backfill / recover / toggle / remove) ended by refetching the WHOLE subscription list (store.loadAll / refresh), which blocked the UI and re-rendered the table — collapsing the expanded row, which read as "locks then resets." The action APIs already return the updated source, so the store now patches that one row in place (_patchSource / _dropSource); the post-action loadAll/refresh calls are gone. Toggling enabled, starting/stopping a backfill, recovering, and removing are now instant and leave the expansion intact. Button regroup (operator-flagged: tiny, mis-clickable, not grouped by function): - New shared SourceActions.vue used by desktop SourceRow + mobile SourceCard. - Frequent actions stay as size="small" buttons: Check, Backfill/Stop. - Low-frequency / destructive actions move into a labelled overflow (⋮) menu — Preview backfill, Recover dropped near-duplicates, Remove source — so they can't be fat-fingered, and the labels spell out recover-vs-backfill. - Edit moves next to the source URL (its identity), out of the action cluster where it sat beside Remove. - Single-source Remove now confirms (it had no guard before). Tests: store patches/drops in place without dropping the cache. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,10 +7,22 @@
|
||||
<v-chip size="x-small" variant="tonal" label>{{ source.platform }}</v-chip>
|
||||
</td>
|
||||
<td class="fc-source-row__url-cell">
|
||||
<a :href="source.url" target="_blank" rel="noopener" class="fc-source-row__url"
|
||||
@click.stop>
|
||||
{{ source.url }}
|
||||
</a>
|
||||
<div class="fc-source-row__url-wrap">
|
||||
<a :href="source.url" target="_blank" rel="noopener" class="fc-source-row__url"
|
||||
@click.stop>
|
||||
{{ source.url }}
|
||||
</a>
|
||||
<!-- Edit sits next to the source identity (operator-requested), not in
|
||||
the action cluster where it was easy to fat-finger Remove. -->
|
||||
<v-btn
|
||||
icon="mdi-pencil" size="x-small" variant="text"
|
||||
class="fc-source-row__edit"
|
||||
@click.stop="$emit('edit', source)"
|
||||
>
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
<v-tooltip activator="parent" location="top">Edit source</v-tooltip>
|
||||
</v-btn>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<v-switch
|
||||
@@ -49,65 +61,20 @@
|
||||
<span v-else class="fc-source-row__zero">0</span>
|
||||
</td>
|
||||
<td class="fc-source-row__actions">
|
||||
<v-btn
|
||||
icon="mdi-play" size="x-small" variant="text"
|
||||
:loading="checking"
|
||||
@click.stop="$emit('check', source)"
|
||||
>
|
||||
<v-icon>mdi-play</v-icon>
|
||||
<v-tooltip activator="parent" location="top">Check now</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
size="x-small" variant="text"
|
||||
:color="source.backfill_state === 'running' ? 'warning' : undefined"
|
||||
@click.stop="$emit('backfill', source)"
|
||||
>
|
||||
<v-icon>{{ source.backfill_state === 'running' ? 'mdi-stop' : 'mdi-magnify-scan' }}</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
{{ source.backfill_state === 'running'
|
||||
? (source.backfill_bypass_seen ? 'Stop recovery' : 'Stop backfill')
|
||||
: 'Backfill — walk the full post history until complete' }}
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="source.platform === 'patreon' && source.backfill_state !== 'running'"
|
||||
size="x-small" variant="text"
|
||||
@click.stop="$emit('preview', source)"
|
||||
>
|
||||
<v-icon>mdi-eye-outline</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
Preview — count what a backfill would download (no download)
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="source.platform === 'patreon' && source.backfill_state !== 'running'"
|
||||
size="x-small" variant="text"
|
||||
@click.stop="$emit('recover', source)"
|
||||
>
|
||||
<v-icon>mdi-backup-restore</v-icon>
|
||||
<v-tooltip activator="parent" location="top">
|
||||
Recover — re-fetch dropped near-dups & re-evaluate under the current threshold
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
icon="mdi-pencil" size="x-small" variant="text"
|
||||
@click.stop="$emit('edit', source)"
|
||||
>
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
<v-tooltip activator="parent" location="top">Edit</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
icon="mdi-close" size="x-small" variant="text" color="error"
|
||||
@click.stop="$emit('remove', source)"
|
||||
>
|
||||
<v-icon>mdi-close</v-icon>
|
||||
<v-tooltip activator="parent" location="top">Remove</v-tooltip>
|
||||
</v-btn>
|
||||
<SourceActions
|
||||
:source="source" :checking="checking"
|
||||
@check="$emit('check', $event)"
|
||||
@backfill="$emit('backfill', $event)"
|
||||
@recover="$emit('recover', $event)"
|
||||
@preview="$emit('preview', $event)"
|
||||
@remove="$emit('remove', $event)"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import SourceActions from './SourceActions.vue'
|
||||
import SourceHealthDot from './SourceHealthDot.vue'
|
||||
import { formatRelative } from '../../utils/date.js'
|
||||
|
||||
@@ -129,18 +96,27 @@ function onToggleEnabled(value) {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.fc-source-row__url-cell {
|
||||
max-width: 400px;
|
||||
max-width: 420px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.fc-source-row__url-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
.fc-source-row__url {
|
||||
color: rgb(var(--v-theme-on-surface-variant));
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* Keep the edit affordance subtle until the row is hovered. */
|
||||
.fc-source-row__edit { opacity: 0.5; flex: 0 0 auto; }
|
||||
.fc-source-row:hover .fc-source-row__edit { opacity: 1; }
|
||||
.fc-source-row__url:hover { color: rgb(var(--v-theme-accent)); }
|
||||
.fc-source-row__when {
|
||||
color: rgb(var(--v-theme-on-surface-variant));
|
||||
|
||||
Reference in New Issue
Block a user