fix: viewer只能看到和管理自己个人配方的标签,不显示公共库标签
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 49s
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 49s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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([])
|
||||
|
||||
Reference in New Issue
Block a user