feat(fc2a): implement Settings Import tab components
ImportTriggerPanel shows an active-batch progress indicator when scan_directory is running, or a "Quick scan" button otherwise. Deep scan deferred to FC-2d is called out in the panel text so it's not a surprise. ImportFiltersForm autosaves on blur/change so there's no Submit button. The transparency and single-color sliders gate on their respective switches. ImportTaskList uses v-data-table-virtual for performance on long histories, with status filter, retry-failed, and a clear-completed dialog with age buckets. Status chips are color-coded via FabledDesignSystem semantic tokens (success/warning/error/accent/info). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1 +1,45 @@
|
||||
<template><div class="text-caption">ImportTriggerPanel — implemented in Task 15</div></template>
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title>Trigger scan</v-card-title>
|
||||
<v-card-text>
|
||||
<div v-if="store.activeBatch" class="d-flex align-center" style="gap: 12px;">
|
||||
<v-progress-circular
|
||||
indeterminate color="accent" size="20"
|
||||
/>
|
||||
<span>
|
||||
Scanning {{ store.activeBatch.source_path }} —
|
||||
imported {{ store.activeBatch.imported }},
|
||||
skipped {{ store.activeBatch.skipped }},
|
||||
failed {{ store.activeBatch.failed }} /
|
||||
{{ store.activeBatch.total_files }} files
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p class="text-body-2 mb-3">
|
||||
Run a quick scan of the import directory. Deep scan (pHash dedup,
|
||||
archives) lands in FC-2d.
|
||||
</p>
|
||||
<v-btn color="primary" rounded="pill" @click="trigger" :loading="busy">
|
||||
<v-icon start>mdi-magnify-scan</v-icon>
|
||||
Quick scan
|
||||
</v-btn>
|
||||
<v-alert v-if="store.triggerError" type="error" variant="tonal" class="mt-3" closable>
|
||||
{{ store.triggerError }}
|
||||
</v-alert>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useImportStore } from '../../stores/import.js'
|
||||
|
||||
const store = useImportStore()
|
||||
const busy = ref(false)
|
||||
|
||||
async function trigger() {
|
||||
busy.value = true
|
||||
try { await store.triggerScan() } catch {} finally { busy.value = false }
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user