fix: UI修复与改进 #29

Merged
hera merged 5 commits from fix/next-batch-3 into main 2026-04-13 13:49:46 +00:00
Showing only changes of commit 1790ab3b44 - Show all commits

View File

@@ -83,7 +83,7 @@
</div>
<div class="candidate-tags">
<span
v-for="tag in recipeStore.allTags.filter(t => !batchTagsSelected.includes(t))"
v-for="tag in visibleAllTags.filter(t => !batchTagsSelected.includes(t))"
:key="tag"
class="candidate-tag"
@click="batchTagsSelected.push(tag)"
@@ -1308,9 +1308,13 @@ const previewRecipeIndex = ref(null)
const previewRecipeData = ref(null)
const showBatchMenu = ref(false)
const visibleAllTags = computed(() => {
const tags = recipeStore.allTags
if (auth.canEdit) return tags
return tags.filter(t => !EDITOR_ONLY_TAGS.includes(t))
if (auth.canEdit) return recipeStore.allTags
// Viewer: only show tags from their own diary recipes
const myTags = new Set()
for (const d of diaryStore.userDiary) {
for (const t of (d.tags || [])) myTags.add(t)
}
return [...myTags].sort((a, b) => a.localeCompare(b, 'zh'))
})
const showBatchTagPicker = ref(false)
const batchTagsSelected = ref([])