Fix being able to add mods to paired instances (#630)

* Fix being able to add mods to paired instances

* Remove debugging output.
This commit is contained in:
chaos
2023-08-19 04:30:07 +03:00
committed by GitHub
parent f7f73b8163
commit abb02ad624
3 changed files with 119 additions and 88 deletions

View File

@@ -11,7 +11,11 @@
>
<div v-for="(option, index) in options" :key="index" @click.stop="optionClicked(option.name)">
<hr v-if="option.type === 'divider'" class="divider" />
<div v-else class="item clickable" :class="[option.color ?? 'base']">
<div
v-else-if="!(isLinkedData(item) && option.name === `add_content`)"
class="item clickable"
:class="[option.color ?? 'base']"
>
<slot :name="option.name" />
</div>
</div>
@@ -55,6 +59,15 @@ defineExpose({
},
})
const isLinkedData = (item) => {
if (item.instance != undefined && item.instance.metadata.linked_data) {
return true
} else if (item.metadata != undefined && item.metadata.linked_data) {
return true
}
return false
}
const hideContextMenu = () => {
shown.value = false
emit('menu-closed')