Fix hide all attributes (#7583)

This commit is contained in:
Denis Bykhov 2025-01-03 07:53:31 +05:00 committed by GitHub
parent 5373501776
commit f44018f9ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 52 additions and 42 deletions

View File

@ -510,6 +510,14 @@ export function createModel (builder: Builder): void {
value: true
})
builder.mixin(tracker.class.Milestone, core.class.Class, setting.mixin.Editable, {
value: true
})
builder.mixin(tracker.class.Component, core.class.Class, setting.mixin.Editable, {
value: true
})
builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.LinkProvider, {
encode: tracker.function.GetIssueLinkFragment
})

View File

@ -29,6 +29,7 @@
export let showLabel: IntlString | undefined = undefined
export let draft = false
export let showHeader: boolean = true
export let isMainClass: boolean = false
const client = getClient()
const hierarchy = client.getHierarchy()
@ -53,8 +54,7 @@
$: collapsed = getCollapsed(_class, nonEmpty)
</script>
{#if keys.length}
{#if showHeader}
{#if showHeader && (keys.length > 0 || isMainClass)}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
@ -96,7 +96,8 @@
{/if}
</div>
</div>
{/if}
{/if}
{#if keys.length}
<div class="collapsed-container" class:collapsed>
<AttributesBar {_class} {object} {keys} {readonly} {draft} on:update />
</div>

View File

@ -38,6 +38,7 @@
{allowedCollections}
{showHeader}
{readonly}
isMainClass
on:update
/>
{#each mixins as mixin}