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