mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-05 15:24:22 +00:00
Auto show left panel in Settings. UI fixes (#7055)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
2f4f15e2d5
commit
7a8ee3cf32
@ -38,7 +38,7 @@
|
|||||||
deviceOptionsStore as deviceInfo
|
deviceOptionsStore as deviceInfo
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { NavFooter } from '@hcengineering/workbench-resources'
|
import { NavFooter } from '@hcengineering/workbench-resources'
|
||||||
import { ComponentType, onDestroy } from 'svelte'
|
import { ComponentType, onDestroy, onMount } from 'svelte'
|
||||||
import { clearSettingsStore, settingsStore, type SettingsStore } from '../store'
|
import { clearSettingsStore, settingsStore, type SettingsStore } from '../store'
|
||||||
import { Analytics } from '@hcengineering/analytics'
|
import { Analytics } from '@hcengineering/analytics'
|
||||||
|
|
||||||
@ -72,6 +72,11 @@
|
|||||||
})(loc)
|
})(loc)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
onMount(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (categoryId === undefined) $deviceInfo.navigator.visible = true
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
|
||||||
function findCategory (name: string): SettingsCategory | undefined {
|
function findCategory (name: string): SettingsCategory | undefined {
|
||||||
return categories.find((x) => x.name === name)
|
return categories.find((x) => x.name === name)
|
||||||
|
@ -23,9 +23,10 @@
|
|||||||
NavItem,
|
NavItem,
|
||||||
getCurrentResolvedLocation,
|
getCurrentResolvedLocation,
|
||||||
navigate,
|
navigate,
|
||||||
resolvedLocationStore
|
resolvedLocationStore,
|
||||||
|
deviceOptionsStore as deviceInfo
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { onDestroy } from 'svelte'
|
import { onDestroy, onMount } from 'svelte'
|
||||||
import { clearSettingsStore } from '../store'
|
import { clearSettingsStore } from '../store'
|
||||||
|
|
||||||
export let kind: 'navigation' | 'content' | undefined
|
export let kind: 'navigation' | 'content' | undefined
|
||||||
@ -65,6 +66,11 @@
|
|||||||
})(loc)
|
})(loc)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
onMount(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (kind === 'content' && category === undefined) $deviceInfo.navigator.visible = true
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
|
||||||
function selectCategory (id: string): void {
|
function selectCategory (id: string): void {
|
||||||
clearSettingsStore()
|
clearSettingsStore()
|
||||||
@ -94,7 +100,7 @@
|
|||||||
<Component is={category.extraComponents?.navigation} props={{ kind: 'navigation', categoryName: categoryId }} />
|
<Component is={category.extraComponents?.navigation} props={{ kind: 'navigation', categoryName: categoryId }} />
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
{:else if kind === 'content' && !category}
|
{:else if kind === 'content' && category === undefined}
|
||||||
<div class="hulyComponent" />
|
<div class="hulyComponent" />
|
||||||
{:else if category}
|
{:else if category}
|
||||||
<Component is={category.component} props={{ kind: 'content' }} on:change />
|
<Component is={category.component} props={{ kind: 'content' }} on:change />
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onDestroy } from 'svelte'
|
import { onDestroy, onMount } from 'svelte'
|
||||||
import core, {
|
import core, {
|
||||||
Class,
|
Class,
|
||||||
Doc,
|
Doc,
|
||||||
@ -30,18 +30,14 @@
|
|||||||
resolvedLocationStore,
|
resolvedLocationStore,
|
||||||
resizeObserver,
|
resizeObserver,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
ButtonIcon,
|
|
||||||
Header,
|
Header,
|
||||||
IconCopy,
|
|
||||||
IconDelete,
|
|
||||||
IconMoreV,
|
|
||||||
AnySvelteComponent,
|
AnySvelteComponent,
|
||||||
navigate,
|
navigate,
|
||||||
getCurrentResolvedLocation,
|
getCurrentResolvedLocation,
|
||||||
IconWithEmoji
|
IconWithEmoji,
|
||||||
|
deviceOptionsStore as deviceInfo
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||||
import { showMenu } from '@hcengineering/view-resources'
|
|
||||||
import setting, { SpaceTypeEditor } from '@hcengineering/setting'
|
import setting, { SpaceTypeEditor } from '@hcengineering/setting'
|
||||||
import { Asset, getResource } from '@hcengineering/platform'
|
import { Asset, getResource } from '@hcengineering/platform'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
@ -138,6 +134,12 @@
|
|||||||
navigate(loc)
|
navigate(loc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (type === undefined && descriptor === undefined) $deviceInfo.navigator.visible = true
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
<span class="labelOnPanel">
|
<span class="labelOnPanel">
|
||||||
<Label label={tracker.string.Priority} />
|
<Label label={tracker.string.Priority} />
|
||||||
</span>
|
</span>
|
||||||
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} />
|
<PriorityEditor value={issue} size={'medium'} shouldShowLabel isEditable={!readonly} width={'100%'} />
|
||||||
|
|
||||||
<span class="labelOnPanel">
|
<span class="labelOnPanel">
|
||||||
<Label label={core.string.CreatedBy} />
|
<Label label={core.string.CreatedBy} />
|
||||||
|
@ -102,6 +102,11 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.link-container {
|
.link-container {
|
||||||
padding: 0px 0.75rem;
|
padding: 0px 0.75rem;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
|
||||||
|
&:not(.readonly) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.add-action {
|
.add-action {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user