diff --git a/frontend/src/components/modal/FandomPicker.vue b/frontend/src/components/modal/FandomPicker.vue index 31189ab..e9ed4a8 100644 --- a/frontend/src/components/modal/FandomPicker.vue +++ b/frontend/src/components/modal/FandomPicker.vue @@ -17,6 +17,10 @@ + + No fandom Cancel Use this fandom @@ -45,4 +49,9 @@ function onConfirm() { const f = store.fandomCache.find(x => x.id === selectedId.value) if (f) emit('confirm', f) } +// Create the character with no fandom. Emits null so the caller knows this +// was a deliberate "unassigned", not a cancel. +function onNoFandom() { + emit('confirm', null) +} diff --git a/frontend/src/components/modal/SuggestionItem.vue b/frontend/src/components/modal/SuggestionItem.vue index 1a0c541..16e55cc 100644 --- a/frontend/src/components/modal/SuggestionItem.vue +++ b/frontend/src/components/modal/SuggestionItem.vue @@ -19,24 +19,25 @@ > Accept - - - - + + + + Treat as alias for… @@ -51,11 +52,12 @@ diff --git a/frontend/src/components/modal/TagAutocomplete.vue b/frontend/src/components/modal/TagAutocomplete.vue index 9767af2..5131688 100644 --- a/frontend/src/components/modal/TagAutocomplete.vue +++ b/frontend/src/components/modal/TagAutocomplete.vue @@ -147,10 +147,14 @@ function onCreate () { reset() } +// fandom is null when the user picked "No fandom" — characters don't all +// belong to a fandom. The backend already accepts fandom_id: null for the +// character kind (tag.kind check + nullable fandom_id), and a fandom can be +// assigned later from the chip kebab's "Set fandom…". function onFandomChosen (fandom) { fandomDialog.value = false emit('pick-new', { - name: pendingNewName, kind: 'character', fandom_id: fandom.id, + name: pendingNewName, kind: 'character', fandom_id: fandom ? fandom.id : null, }) pendingNewName = null reset() diff --git a/frontend/src/components/modal/TagPanel.vue b/frontend/src/components/modal/TagPanel.vue index f1f83dd..319b0b9 100644 --- a/frontend/src/components/modal/TagPanel.vue +++ b/frontend/src/components/modal/TagPanel.vue @@ -10,20 +10,24 @@ > {{ iconFor(tag.kind) }} {{ tag.name }} - - - - + + + + Rename… @@ -84,6 +88,9 @@ import FandomSetDialog from './FandomSetDialog.vue' const modal = useModalStore() const store = useTagStore() const errorMsg = ref(null) +// Which tag chip's kebab menu is open (only one at a time). Drives each +// chip menu's v-model so opening never depends on Vuetify's activator click. +const openTagId = ref(null) const KIND_ICONS = { general: 'mdi-tag', character: 'mdi-account-circle', @@ -147,4 +154,5 @@ async function onFandomUpdated() { } .fc-tag-panel__chips { display: flex; flex-wrap: wrap; gap: 6px; } .kebab-wrap { display: inline-flex; align-items: center; } +.kebab-icon { cursor: pointer; }