diff --git a/models/card/src/index.ts b/models/card/src/index.ts index ceca23e187..486d6a972a 100644 --- a/models/card/src/index.ts +++ b/models/card/src/index.ts @@ -16,13 +16,12 @@ import { CardEvents, cardId, DOMAIN_CARD, - type ParentInfo, type Card, type MasterTag, + type ParentInfo, type Tag } from '@hcengineering/card' import chunter from '@hcengineering/chunter' -import contact from '@hcengineering/contact' import core, { AccountRole, DOMAIN_MODEL, @@ -368,8 +367,7 @@ export function createModel (builder: Builder): void { name: 'tagrelation', label: card.string.TagRelations, icon: setting.icon.Relations, - props: { _classes: [card.class.Card, contact.class.Contact], exclude: [] }, - component: setting.component.RelationSetting, + component: card.component.RelationSetting, group: 'settings-editor', role: AccountRole.Maintainer, order: 4501 @@ -381,7 +379,7 @@ export function createModel (builder: Builder): void { setting.class.SettingsCategory, core.space.Model, { - name: 'masterTags', + name: 'types', label: card.string.MasterTags, icon: card.icon.Card, component: card.component.ManageMasterTagsContent, diff --git a/models/server-card/src/index.ts b/models/server-card/src/index.ts index 39b643b81b..9bfe6c7114 100644 --- a/models/server-card/src/index.ts +++ b/models/server-card/src/index.ts @@ -77,12 +77,11 @@ export function createModel (builder: Builder): void { }) builder.createDoc(serverCore.class.Trigger, core.space.Model, { - trigger: serverCard.trigger.OnCardParentChange, + trigger: serverCard.trigger.OnCardUpdate, isAsync: true, txMatch: { _class: core.class.TxUpdateDoc, - objectClass: card.class.Card, - operations: { parent: { $exists: true } } + objectClass: card.class.Card } }) diff --git a/plugins/card-assets/lang/de.json b/plugins/card-assets/lang/de.json index 409cfede28..79914743bd 100644 --- a/plugins/card-assets/lang/de.json +++ b/plugins/card-assets/lang/de.json @@ -5,10 +5,10 @@ "Cards": "Karten", "Content": "Inhalt", "CreateCard": "Karte erstellen", - "CreateMasterTag": "Master-Tag erstellen", + "CreateMasterTag": "Typ erstellen", "CreateTag": "Tag erstellen", - "MasterTag": "Master-Tag", - "MasterTags": "Master-Tags", + "MasterTag": "Typ", + "MasterTags": "Typen", "Parent": "Eltern", "Tags": "Tags", "Tag": "Tag", @@ -18,11 +18,11 @@ "TagRelations": "Tag-Beziehungen", "DeleteTag": "Tag löschen", "DeleteTagConfirm": "Möchten Sie diesen Tag wirklich löschen? Alle zugehörigen Eigenschaften werden gelöscht", - "DeleteMasterTag": "Master-Tag löschen", - "DeleteMasterTagConfirm": "Möchten Sie diesen Master-Tag wirklich löschen? Alle mit diesem Master-Tag verbundenen Objekte werden gelöscht", + "DeleteMasterTag": "Typ löschen", + "DeleteMasterTagConfirm": "Möchten Sie diesen Typ wirklich löschen? Alle mit diesem Typ verbundenen Objekte werden gelöscht", "UnsetParent": "Elternteil entfernen", "SetParent": "Elternteil setzen", "CreateChild": "Kind erstellen", "Children": "Kinder" } -} \ No newline at end of file +} diff --git a/plugins/card-resources/src/components/CardPresenter.svelte b/plugins/card-resources/src/components/CardPresenter.svelte index c04d5ea19b..af560ead0d 100644 --- a/plugins/card-resources/src/components/CardPresenter.svelte +++ b/plugins/card-resources/src/components/CardPresenter.svelte @@ -40,6 +40,9 @@ {:else if value} {#if type === 'link'}
+ {#if showParent} + + {/if} {value.title} - {#if showParent} - - {/if} diff --git a/plugins/card-resources/src/components/MasterTagAttributes.svelte b/plugins/card-resources/src/components/MasterTagAttributes.svelte index 8449bf208f..34910fe02e 100644 --- a/plugins/card-resources/src/components/MasterTagAttributes.svelte +++ b/plugins/card-resources/src/components/MasterTagAttributes.svelte @@ -74,7 +74,7 @@ ev.stopPropagation() const loc = getCurrentResolvedLocation() loc.path[2] = settingId - loc.path[3] = 'masterTags' + loc.path[3] = 'types' loc.path[4] = value._class loc.path.length = 5 loc.fragment = undefined diff --git a/plugins/card-resources/src/components/ParentNamesPresenter.svelte b/plugins/card-resources/src/components/ParentNamesPresenter.svelte index 795f812836..fc78066718 100644 --- a/plugins/card-resources/src/components/ParentNamesPresenter.svelte +++ b/plugins/card-resources/src/components/ParentNamesPresenter.svelte @@ -72,7 +72,7 @@ &:active { color: var(--theme-content-color); } - &::before { + &::after { content: '›'; padding: 0 0.25rem; } diff --git a/plugins/card-resources/src/components/SetParentActionPopup.svelte b/plugins/card-resources/src/components/SetParentActionPopup.svelte index c81981f5eb..0dc309be25 100644 --- a/plugins/card-resources/src/components/SetParentActionPopup.svelte +++ b/plugins/card-resources/src/components/SetParentActionPopup.svelte @@ -14,7 +14,7 @@ --> { dispatch('select', clazz._id) }} - on:contextmenu={(evt) => { - showMenu(evt, { object: clazz }) - }} /> {#if (descendants.get(clazz._id)?.length ?? 0) > 0} diff --git a/plugins/card-resources/src/components/settings/CreateRelation.svelte b/plugins/card-resources/src/components/settings/CreateRelation.svelte new file mode 100644 index 0000000000..723e74369e --- /dev/null +++ b/plugins/card-resources/src/components/settings/CreateRelation.svelte @@ -0,0 +1,17 @@ + + + diff --git a/plugins/card-resources/src/components/settings/ManageMasterTagsContent.svelte b/plugins/card-resources/src/components/settings/ManageMasterTagsContent.svelte index 5bfae56ec5..d927bae8ae 100644 --- a/plugins/card-resources/src/components/settings/ManageMasterTagsContent.svelte +++ b/plugins/card-resources/src/components/settings/ManageMasterTagsContent.svelte @@ -35,7 +35,7 @@ onDestroy(resolvedLocationStore.subscribe(handleLocationChanged)) function handleLocationChanged ({ path }: Location): void { - if (path[3] !== 'masterTags' || path[4] === undefined) { + if (path[3] !== 'types' || path[4] === undefined) { selectedTagId = undefined } else { selectedTagId = path[4] as Ref diff --git a/plugins/card-resources/src/components/settings/RelationSetting.svelte b/plugins/card-resources/src/components/settings/RelationSetting.svelte new file mode 100644 index 0000000000..63a4fda491 --- /dev/null +++ b/plugins/card-resources/src/components/settings/RelationSetting.svelte @@ -0,0 +1,14 @@ + + + diff --git a/plugins/card-resources/src/components/settings/RelationsSection.svelte b/plugins/card-resources/src/components/settings/RelationsSection.svelte index a9544ddead..c2d62e853f 100644 --- a/plugins/card-resources/src/components/settings/RelationsSection.svelte +++ b/plugins/card-resources/src/components/settings/RelationsSection.svelte @@ -13,8 +13,7 @@ // limitations under the License. -->