Browse hub, series rename, full-prediction dropdown + a DRY pass (7 sweeps) #90

Merged
bvandeusen merged 10 commits from dev into main 2026-06-10 00:24:01 -04:00
Showing only changes of commit 409bbd43db - Show all commits
+23
View File
@@ -2,6 +2,12 @@
<v-container fluid class="pt-2 pb-10 fc-series">
<div class="fc-series__head">
<span class="fc-series__name">{{ store.series?.name || 'Series' }}</span>
<v-btn
v-if="store.series"
icon="mdi-pencil" size="x-small" variant="text"
:aria-label="`Rename ${store.series.name}`"
@click="renameOpen = true"
/>
<span class="fc-series__count">
{{ store.chapters.length }} part(s) · {{ store.pageCount }} page(s)
</span>
@@ -214,6 +220,14 @@
<div ref="sentinel" class="fc-picker__sentinel" />
</div>
</v-navigation-drawer>
<v-dialog v-model="renameOpen" max-width="420">
<TagRenameDialog
v-if="store.series"
:tag="{ id: store.tagId, name: store.series.name, kind: 'series' }"
@renamed="onRenamed" @cancel="renameOpen = false"
/>
</v-dialog>
</v-container>
</template>
@@ -223,6 +237,7 @@ import { useRoute } from 'vue-router'
import { useSeriesManageStore, moveItem } from '../stores/seriesManage.js'
import { useInfiniteScroll } from '../composables/useInfiniteScroll.js'
import KebabMenu from '../components/common/KebabMenu.vue'
import TagRenameDialog from '../components/modal/TagRenameDialog.vue'
const route = useRoute()
const store = useSeriesManageStore()
@@ -231,6 +246,14 @@ const drag = ref(null) // { chapterId, idx }
const titleDraft = reactive({}) // chapterId -> draft title
const partDraft = reactive({}) // chapterId -> draft stated_part (string)
const pickerOpen = ref(false)
const renameOpen = ref(false)
// A series IS a Tag(kind=series); TagRenameDialog PATCHes /api/tags/<id> and
// handles the same-name collision→merge flow. Reflect the new name in place.
function onRenamed(updated) {
renameOpen.value = false
if (store.series && updated?.name) store.series.name = updated.name
}
// Keep local drafts in sync with loaded chapters. Edits commit on blur/Enter,
// which refreshes and resets the draft to the saved value.