mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-08 10:47:42 +02:00
Mobile layout fixes (#7077)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
@@ -647,6 +647,18 @@
|
||||
const checkOnHide = (): void => {
|
||||
if ($deviceInfo.navigator.visible && $deviceInfo.docWidth <= 1024) $deviceInfo.navigator.visible = false
|
||||
}
|
||||
let oldNavVisible: boolean = $deviceInfo.navigator.visible
|
||||
let oldASideVisible: boolean = $deviceInfo.aside.visible
|
||||
$: if (oldNavVisible !== $deviceInfo.navigator.visible || oldASideVisible !== $deviceInfo.aside.visible) {
|
||||
if ($deviceInfo.isMobile && $deviceInfo.isPortrait && $deviceInfo.navigator.float) {
|
||||
if ($deviceInfo.navigator.visible && $deviceInfo.aside.visible) {
|
||||
if (oldNavVisible) $deviceInfo.navigator.visible = false
|
||||
else $deviceInfo.aside.visible = false
|
||||
}
|
||||
}
|
||||
oldNavVisible = $deviceInfo.navigator.visible
|
||||
oldASideVisible = $deviceInfo.aside.visible
|
||||
}
|
||||
$: $deviceInfo.navigator.direction = $deviceInfo.isMobile && $deviceInfo.isPortrait ? 'horizontal' : 'vertical'
|
||||
let appsMini: boolean
|
||||
$: appsMini =
|
||||
|
||||
@@ -57,23 +57,25 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if !mini}
|
||||
<ScrollerBar bind:scroller padding={'.25rem 0'}>
|
||||
<div class="flex-row-center gap-1 py-1 overflow-x-auto">
|
||||
{#each $tabsStore as tab (tab._id)}
|
||||
<WorkbenchTabPresenter {tab} />
|
||||
{/each}
|
||||
</ScrollerBar>
|
||||
</div>
|
||||
{:else if selectedTab !== undefined}
|
||||
<WorkbenchTabPresenter tab={selectedTab} />
|
||||
<ButtonIcon
|
||||
bind:element
|
||||
icon={IconMoreH}
|
||||
iconProps={{ fill: 'var(--theme-dark-color)' }}
|
||||
size={'extra-small'}
|
||||
kind={'tertiary'}
|
||||
hasMenu
|
||||
{pressed}
|
||||
on:click={showTabs}
|
||||
/>
|
||||
{#if $tabsStore.length > 1}
|
||||
<ButtonIcon
|
||||
bind:element
|
||||
icon={IconMoreH}
|
||||
iconProps={{ fill: 'var(--theme-dark-color)' }}
|
||||
size={'extra-small'}
|
||||
kind={'tertiary'}
|
||||
hasMenu
|
||||
{pressed}
|
||||
on:click={showTabs}
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if !popup}
|
||||
<ButtonIcon
|
||||
|
||||
Reference in New Issue
Block a user