Operator-requested follow-ups: - #1 Failure reason on hover: the red error-count chip now shows source.last_error in a tooltip (desktop row + mobile card), so the cause (e.g. the new "vanity=cw" message) is visible without opening Downloads. - #2 Collapse the single-source case: a subscription with exactly one source now shows that source's URL + its own actions (Check / Backfill / ⋮ / Edit) inline on the artist row — no expand needed for the common case. Multi-source keeps the artist-level actions + expandable per-source table. - #3 Sort by health: the Health column is sortable on a numeric rank (never/ok/warn/fail) and the table defaults to worst-first, name as tiebreak. - #4 Drop Preview: removed the low-value bounded-peek action from the menu and all its wiring (backend endpoint + store fn left in place, unused). - #5 Backfill selected: a "Backfill" button in the bulk bar arms a run-until-done backfill on every enabled, not-already-running source in the selection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
82 lines
2.8 KiB
Vue
82 lines
2.8 KiB
Vue
<template>
|
|
<!-- Shared per-source action cluster (desktop SourceRow + mobile SourceCard).
|
|
Frequent actions stay as buttons; low-frequency / destructive ones move
|
|
into a labelled overflow menu so they can't be mis-clicked, and the
|
|
labels spell out what each one does (recover vs backfill). -->
|
|
<div class="fc-src-actions">
|
|
<v-btn
|
|
icon size="small" variant="text" :loading="checking"
|
|
@click.stop="emit('check', source)"
|
|
>
|
|
<v-icon>mdi-play</v-icon>
|
|
<v-tooltip activator="parent" location="top">
|
|
Check now — fetch posts published since the last check
|
|
</v-tooltip>
|
|
</v-btn>
|
|
<v-btn
|
|
icon size="small" variant="text"
|
|
:color="running ? 'warning' : undefined"
|
|
@click.stop="emit('backfill', source)"
|
|
>
|
|
<v-icon>{{ running ? 'mdi-stop' : 'mdi-magnify-scan' }}</v-icon>
|
|
<v-tooltip activator="parent" location="top">
|
|
{{ running
|
|
? (recovering ? 'Stop recovery' : 'Stop backfill')
|
|
: 'Backfill — one-time walk of the FULL post history until complete' }}
|
|
</v-tooltip>
|
|
</v-btn>
|
|
|
|
<v-menu location="bottom end">
|
|
<template #activator="{ props: menuProps }">
|
|
<v-btn icon size="small" variant="text" v-bind="menuProps" @click.stop>
|
|
<v-icon>mdi-dots-vertical</v-icon>
|
|
<v-tooltip activator="parent" location="top">More actions</v-tooltip>
|
|
</v-btn>
|
|
</template>
|
|
<v-list density="compact" min-width="260">
|
|
<v-list-item
|
|
v-if="isPatreon && !running"
|
|
prepend-icon="mdi-backup-restore"
|
|
@click="emit('recover', source)"
|
|
>
|
|
<v-list-item-title>Recover dropped near-duplicates</v-list-item-title>
|
|
<v-list-item-subtitle>
|
|
Re-fetch images previously dropped as near-dups and re-judge them
|
|
under the current similarity threshold
|
|
</v-list-item-subtitle>
|
|
</v-list-item>
|
|
<v-divider v-if="isPatreon && !running" />
|
|
<v-list-item
|
|
base-color="error"
|
|
prepend-icon="mdi-delete-outline"
|
|
@click="emit('remove', source)"
|
|
>
|
|
<v-list-item-title>Remove source</v-list-item-title>
|
|
</v-list-item>
|
|
</v-list>
|
|
</v-menu>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed } from 'vue'
|
|
|
|
const props = defineProps({
|
|
source: { type: Object, required: true },
|
|
checking: { type: Boolean, default: false },
|
|
})
|
|
const emit = defineEmits(['check', 'backfill', 'recover', 'remove'])
|
|
|
|
const running = computed(() => props.source.backfill_state === 'running')
|
|
const recovering = computed(() => !!props.source.backfill_bypass_seen)
|
|
const isPatreon = computed(() => props.source.platform === 'patreon')
|
|
</script>
|
|
|
|
<style scoped>
|
|
.fc-src-actions {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
</style>
|