mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-12 19:30:52 +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
|
||||
})
|
||||
|
||||
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
|
||||
})
|
||||
|
@ -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,50 +54,50 @@
|
||||
$: collapsed = getCollapsed(_class, nonEmpty)
|
||||
</script>
|
||||
|
||||
{#if keys.length}
|
||||
{#if showHeader}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="attrbar-header"
|
||||
class:collapsed
|
||||
on:click={() => {
|
||||
collapsed = !collapsed
|
||||
}}
|
||||
>
|
||||
<div class="flex-row-center">
|
||||
<span class="overflow-label">
|
||||
<Label {label} />
|
||||
</span>
|
||||
<div class="icon-arrow">
|
||||
<svg fill="var(--theme-dark-color)" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0,0L6,3L0,6Z" />
|
||||
</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}
|
||||
{#if showHeader && (keys.length > 0 || isMainClass)}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="attrbar-header"
|
||||
class:collapsed
|
||||
on:click={() => {
|
||||
collapsed = !collapsed
|
||||
}}
|
||||
>
|
||||
<div class="flex-row-center">
|
||||
<span class="overflow-label">
|
||||
<Label {label} />
|
||||
</span>
|
||||
<div class="icon-arrow">
|
||||
<svg fill="var(--theme-dark-color)" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0,0L6,3L0,6Z" />
|
||||
</svg>
|
||||
</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>
|
||||
<AttributesBar {_class} {object} {keys} {readonly} {draft} on:update />
|
||||
</div>
|
||||
|
@ -38,6 +38,7 @@
|
||||
{allowedCollections}
|
||||
{showHeader}
|
||||
{readonly}
|
||||
isMainClass
|
||||
on:update
|
||||
/>
|
||||
{#each mixins as mixin}
|
||||
|
Loading…
Reference in New Issue
Block a user