mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Fixed workbench for guests (#5459)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
109985333f
commit
608ea96cc8
@ -34,6 +34,7 @@
|
|||||||
getLocation,
|
getLocation,
|
||||||
navigate,
|
navigate,
|
||||||
openPanel,
|
openPanel,
|
||||||
|
defineSeparators,
|
||||||
setResolvedLocation
|
setResolvedLocation
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
@ -42,6 +43,7 @@
|
|||||||
import { SpaceView, buildNavModel } from '@hcengineering/workbench-resources'
|
import { SpaceView, buildNavModel } from '@hcengineering/workbench-resources'
|
||||||
import guest from '../plugin'
|
import guest from '../plugin'
|
||||||
import { checkAccess } from '../utils'
|
import { checkAccess } from '../utils'
|
||||||
|
import { workbenchGuestSeparators } from '..'
|
||||||
|
|
||||||
const excludedApps = getMetadata(workbench.metadata.ExcludedApplications) ?? []
|
const excludedApps = getMetadata(workbench.metadata.ExcludedApplications) ?? []
|
||||||
|
|
||||||
@ -263,14 +265,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineSeparators('workbenchGuest', workbenchGuestSeparators)
|
||||||
|
|
||||||
let aside: HTMLElement
|
let aside: HTMLElement
|
||||||
let cover: HTMLElement
|
let cover: HTMLElement
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#await load() then res}
|
{#await load() then res}
|
||||||
{#if res}
|
{#if res}
|
||||||
<div class="workbench-container h-full" style:flex-direction={'row'}>
|
<div class="workbench-container" style:flex-direction={'row'}>
|
||||||
<div class="workbench-container inner h-full">
|
<div class="workbench-container inner">
|
||||||
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
||||||
{#if currentApplication && currentApplication.component}
|
{#if currentApplication && currentApplication.component}
|
||||||
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
||||||
@ -296,7 +300,7 @@
|
|||||||
{#if asideId}
|
{#if asideId}
|
||||||
{@const asideComponent = navigatorModel?.aside ?? currentApplication?.aside}
|
{@const asideComponent = navigatorModel?.aside ?? currentApplication?.aside}
|
||||||
{#if asideComponent !== undefined}
|
{#if asideComponent !== undefined}
|
||||||
<Separator name={'workbench'} index={1} />
|
<Separator name={'workbenchGuest'} index={0} />
|
||||||
<div class="antiPanel-component antiComponent aside" bind:this={aside}>
|
<div class="antiPanel-component antiComponent aside" bind:this={aside}>
|
||||||
<Component is={asideComponent} props={{ currentSpace, _id: asideId }} on:close={closeAside} />
|
<Component is={asideComponent} props={{ currentSpace, _id: asideId }} on:close={closeAside} />
|
||||||
</div>
|
</div>
|
||||||
@ -326,6 +330,14 @@
|
|||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.workbench-container {
|
||||||
|
display: flex;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
.version-wrapper {
|
.version-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { type Resources } from '@hcengineering/platform'
|
import { type Resources } from '@hcengineering/platform'
|
||||||
|
import { type DefSeparators } from '@hcengineering/ui'
|
||||||
import CreatePublicLink from './components/CreatePublicLink.svelte'
|
import CreatePublicLink from './components/CreatePublicLink.svelte'
|
||||||
import GuestApp from './components/GuestApp.svelte'
|
import GuestApp from './components/GuestApp.svelte'
|
||||||
|
|
||||||
@ -8,3 +9,5 @@ export default async (): Promise<Resources> => ({
|
|||||||
CreatePublicLink
|
CreatePublicLink
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const workbenchGuestSeparators: DefSeparators = [null, { minSize: 20, size: 30, maxSize: 50, float: 'aside' }]
|
||||||
|
Loading…
Reference in New Issue
Block a user