Auto show left panel in Settings. UI fixes (#7055)

Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
Alexander Platov 2024-10-28 18:17:07 +03:00 committed by GitHub
parent 2f4f15e2d5
commit 7a8ee3cf32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 30 additions and 12 deletions

View File

@ -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)

View File

@ -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 />

View File

@ -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

View File

@ -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} />

View File

@ -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;
}