mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-17 13:54:11 +00:00
Fix hide all attributes (#7583)
This commit is contained in:
parent
5373501776
commit
f44018f9ef
@ -510,6 +510,14 @@ export function createModel (builder: Builder): void {
|
|||||||
value: true
|
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, {
|
builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.LinkProvider, {
|
||||||
encode: tracker.function.GetIssueLinkFragment
|
encode: tracker.function.GetIssueLinkFragment
|
||||||
})
|
})
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
export let showLabel: IntlString | undefined = undefined
|
export let showLabel: IntlString | undefined = undefined
|
||||||
export let draft = false
|
export let draft = false
|
||||||
export let showHeader: boolean = true
|
export let showHeader: boolean = true
|
||||||
|
export let isMainClass: boolean = false
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const hierarchy = client.getHierarchy()
|
const hierarchy = client.getHierarchy()
|
||||||
@ -53,50 +54,50 @@
|
|||||||
$: collapsed = getCollapsed(_class, nonEmpty)
|
$: collapsed = getCollapsed(_class, nonEmpty)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if keys.length}
|
{#if showHeader && (keys.length > 0 || isMainClass)}
|
||||||
{#if showHeader}
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<div
|
||||||
<div
|
class="attrbar-header"
|
||||||
class="attrbar-header"
|
class:collapsed
|
||||||
class:collapsed
|
on:click={() => {
|
||||||
on:click={() => {
|
collapsed = !collapsed
|
||||||
collapsed = !collapsed
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<div class="flex-row-center">
|
||||||
<div class="flex-row-center">
|
<span class="overflow-label">
|
||||||
<span class="overflow-label">
|
<Label {label} />
|
||||||
<Label {label} />
|
</span>
|
||||||
</span>
|
<div class="icon-arrow">
|
||||||
<div class="icon-arrow">
|
<svg fill="var(--theme-dark-color)" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg">
|
||||||
<svg fill="var(--theme-dark-color)" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg">
|
<path d="M0,0L6,3L0,6Z" />
|
||||||
<path d="M0,0L6,3L0,6Z" />
|
</svg>
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tool">
|
|
||||||
{#if !$restrictionStore.disableNavigation}
|
|
||||||
<Button
|
|
||||||
icon={setting.icon.Setting}
|
|
||||||
kind={'link'}
|
|
||||||
size={'medium'}
|
|
||||||
showTooltip={{ label: setting.string.ClassSetting }}
|
|
||||||
on:click={(ev) => {
|
|
||||||
ev.stopPropagation()
|
|
||||||
const loc = getCurrentResolvedLocation()
|
|
||||||
loc.path[2] = settingId
|
|
||||||
loc.path[3] = 'setting'
|
|
||||||
loc.path[4] = 'classes'
|
|
||||||
loc.path.length = 5
|
|
||||||
loc.query = { _class }
|
|
||||||
loc.fragment = undefined
|
|
||||||
navigate(loc)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
<div class="tool">
|
||||||
|
{#if !$restrictionStore.disableNavigation}
|
||||||
|
<Button
|
||||||
|
icon={setting.icon.Setting}
|
||||||
|
kind={'link'}
|
||||||
|
size={'medium'}
|
||||||
|
showTooltip={{ label: setting.string.ClassSetting }}
|
||||||
|
on:click={(ev) => {
|
||||||
|
ev.stopPropagation()
|
||||||
|
const loc = getCurrentResolvedLocation()
|
||||||
|
loc.path[2] = settingId
|
||||||
|
loc.path[3] = 'setting'
|
||||||
|
loc.path[4] = 'classes'
|
||||||
|
loc.path.length = 5
|
||||||
|
loc.query = { _class }
|
||||||
|
loc.fragment = undefined
|
||||||
|
navigate(loc)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{#if keys.length}
|
||||||
<div class="collapsed-container" class:collapsed>
|
<div class="collapsed-container" class:collapsed>
|
||||||
<AttributesBar {_class} {object} {keys} {readonly} {draft} on:update />
|
<AttributesBar {_class} {object} {keys} {readonly} {draft} on:update />
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
{allowedCollections}
|
{allowedCollections}
|
||||||
{showHeader}
|
{showHeader}
|
||||||
{readonly}
|
{readonly}
|
||||||
|
isMainClass
|
||||||
on:update
|
on:update
|
||||||
/>
|
/>
|
||||||
{#each mixins as mixin}
|
{#each mixins as mixin}
|
||||||
|
Loading…
Reference in New Issue
Block a user