diff --git a/plugins/tags-resources/src/components/TagsAttributeEditor.svelte b/plugins/tags-resources/src/components/TagsAttributeEditor.svelte index 3a4bf44594..eabba481e1 100644 --- a/plugins/tags-resources/src/components/TagsAttributeEditor.svelte +++ b/plugins/tags-resources/src/components/TagsAttributeEditor.svelte @@ -10,7 +10,7 @@ export let object: Doc export let label: IntlString - export let isEditable: boolean = true + export let readonly: boolean = false export let attr: AnyAttribute | undefined = undefined let items: TagReference[] = [] @@ -21,7 +21,7 @@ items = result }) async function tagsHandler (evt: MouseEvent): Promise { - if (!isEditable) return + if (readonly) return showPopup(TagsEditorPopup, { object }, getEventPopupPositionElement(evt)) } async function removeTag (tag: Ref): Promise { @@ -34,10 +34,16 @@
{#each items as value}
- removeTag(res.detail)} /> + removeTag(res.detail)} + />
{/each} - {#if isEditable} + {#if !readonly}
{/if}
-{:else if isEditable} +{:else if !readonly}