mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 08:57:14 +03:00
Qfix: Fix separator and folder scroll in test management (#7165)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
parent
6369e3f093
commit
3837e68589
@ -14,9 +14,9 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Class, Doc, DocumentQuery, Ref, SortingOrder, Space } from '@hcengineering/core'
|
import { Class, Doc, DocumentQuery, Ref, SortingOrder } from '@hcengineering/core'
|
||||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||||
import { Action, IconEdit, navigate, type Location } from '@hcengineering/ui'
|
import { Action, IconEdit, navigate, type Location, Scroller } from '@hcengineering/ui'
|
||||||
import { getResource, type Resource } from '@hcengineering/platform'
|
import { getResource, type Resource } from '@hcengineering/platform'
|
||||||
import { IntlString, Asset } from '@hcengineering/platform'
|
import { IntlString, Asset } from '@hcengineering/platform'
|
||||||
|
|
||||||
@ -45,7 +45,7 @@
|
|||||||
foldersState = newState
|
foldersState = newState
|
||||||
})
|
})
|
||||||
|
|
||||||
let selected: Ref<Doc> | undefined
|
let selected: Ref<Doc> = noParentId
|
||||||
let visibleItem: Doc | undefined
|
let visibleItem: Doc | undefined
|
||||||
|
|
||||||
const q = createQuery()
|
const q = createQuery()
|
||||||
@ -65,7 +65,6 @@
|
|||||||
async function handleFolderSelected (_id: Ref<Doc>): Promise<void> {
|
async function handleFolderSelected (_id: Ref<Doc>): Promise<void> {
|
||||||
selected = _id
|
selected = _id
|
||||||
visibleItem = selected !== undefined ? foldersState.folderById.get(selected) : undefined
|
visibleItem = selected !== undefined ? foldersState.folderById.get(selected) : undefined
|
||||||
const folder = foldersState.folderById.get(_id)
|
|
||||||
if (getFolderLink) {
|
if (getFolderLink) {
|
||||||
const getFolderLinkFunction = await getResource(getFolderLink)
|
const getFolderLinkFunction = await getResource(getFolderLink)
|
||||||
navigate(getFolderLinkFunction(_id))
|
navigate(getFolderLinkFunction(_id))
|
||||||
@ -100,7 +99,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="folders-browser">
|
<Scroller padding={'1rem 0'}>
|
||||||
<TreeNode
|
<TreeNode
|
||||||
_id={noParentId}
|
_id={noParentId}
|
||||||
icon={allObjectsIcon}
|
icon={allObjectsIcon}
|
||||||
@ -139,11 +138,4 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</TreeNode>
|
</TreeNode>
|
||||||
</div>
|
</Scroller>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.folders-browser {
|
|
||||||
display: flex;
|
|
||||||
padding-top: 1rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -26,7 +26,10 @@
|
|||||||
Separator,
|
Separator,
|
||||||
showPopup,
|
showPopup,
|
||||||
getLocation,
|
getLocation,
|
||||||
resolvedLocationStore
|
resolvedLocationStore,
|
||||||
|
deviceOptionsStore as deviceInfo,
|
||||||
|
defineSeparators,
|
||||||
|
workbenchSeparators
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { Doc, DocumentQuery, Ref, Space, mergeQueries } from '@hcengineering/core'
|
import { Doc, DocumentQuery, Ref, Space, mergeQueries } from '@hcengineering/core'
|
||||||
import { IntlString, Asset } from '@hcengineering/platform'
|
import { IntlString, Asset } from '@hcengineering/platform'
|
||||||
@ -64,33 +67,56 @@
|
|||||||
if (createComponent === undefined) return
|
if (createComponent === undefined) return
|
||||||
showPopup(createComponent, { ...createComponentProps, space }, 'top')
|
showPopup(createComponent, { ...createComponentProps, space }, 'top')
|
||||||
}
|
}
|
||||||
|
defineSeparators('parentsNavigator', workbenchSeparators)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="hulyComponent-content__container columns">
|
<div class="hulyComponent-content__container columns">
|
||||||
<div class="hulyComponent-content__column">
|
{#if $deviceInfo.navigator.visible}
|
||||||
<Header adaptive={'disabled'}>
|
<div
|
||||||
<Breadcrumb icon={navigationComponentIcon} label={navigationComponentLabel} size={'large'} />
|
class="antiPanel-navigator {$deviceInfo.navigator.direction === 'horizontal'
|
||||||
<svelte:fragment slot="actions">
|
? 'portrait'
|
||||||
{#if createComponent}
|
: 'landscape'} border-left"
|
||||||
<Button
|
>
|
||||||
icon={IconAdd}
|
<div class="hulyComponent-content__column">
|
||||||
kind={'icon'}
|
<Header adaptive={'disabled'}>
|
||||||
on:click={() => {
|
<Breadcrumb icon={navigationComponentIcon} label={navigationComponentLabel} size={'large'} />
|
||||||
showCreateDialog()
|
<svelte:fragment slot="actions">
|
||||||
}}
|
{#if createComponent}
|
||||||
/>
|
<Button
|
||||||
{/if}
|
icon={IconAdd}
|
||||||
</svelte:fragment>
|
kind={'icon'}
|
||||||
</Header>
|
on:click={() => {
|
||||||
<Component
|
showCreateDialog()
|
||||||
is={navigationComponent}
|
}}
|
||||||
props={{
|
/>
|
||||||
...navigationComponentProps,
|
{/if}
|
||||||
query: spaceQuery
|
</svelte:fragment>
|
||||||
}}
|
</Header>
|
||||||
|
<Component
|
||||||
|
is={navigationComponent}
|
||||||
|
props={{
|
||||||
|
...navigationComponentProps,
|
||||||
|
query: spaceQuery
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Separator
|
||||||
|
name={'parentsNavigator'}
|
||||||
|
float={$deviceInfo.navigator.float ? 'navigator' : true}
|
||||||
|
index={0}
|
||||||
|
color={'transparent'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Separator
|
||||||
|
name={'parentsNavigator'}
|
||||||
|
float={$deviceInfo.navigator.float}
|
||||||
|
index={0}
|
||||||
|
color={'transparent'}
|
||||||
|
separatorSize={0}
|
||||||
|
short
|
||||||
/>
|
/>
|
||||||
</div>
|
{/if}
|
||||||
<Separator name={'navigationSection'} index={0} color={'var(--theme-divider-color)'} />
|
|
||||||
<div class="hulyComponent-content__column">
|
<div class="hulyComponent-content__column">
|
||||||
<Header adaptive={'disabled'}>
|
<Header adaptive={'disabled'}>
|
||||||
<Breadcrumb icon={mainComponentIcon} label={mainComponentLabel} size={'large'} />
|
<Breadcrumb icon={mainComponentIcon} label={mainComponentLabel} size={'large'} />
|
||||||
|
Loading…
Reference in New Issue
Block a user