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,
|
||||
navigate,
|
||||
openPanel,
|
||||
defineSeparators,
|
||||
setResolvedLocation
|
||||
} from '@hcengineering/ui'
|
||||
import view from '@hcengineering/view'
|
||||
@ -42,6 +43,7 @@
|
||||
import { SpaceView, buildNavModel } from '@hcengineering/workbench-resources'
|
||||
import guest from '../plugin'
|
||||
import { checkAccess } from '../utils'
|
||||
import { workbenchGuestSeparators } from '..'
|
||||
|
||||
const excludedApps = getMetadata(workbench.metadata.ExcludedApplications) ?? []
|
||||
|
||||
@ -263,14 +265,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
defineSeparators('workbenchGuest', workbenchGuestSeparators)
|
||||
|
||||
let aside: HTMLElement
|
||||
let cover: HTMLElement
|
||||
</script>
|
||||
|
||||
{#await load() then res}
|
||||
{#if res}
|
||||
<div class="workbench-container h-full" style:flex-direction={'row'}>
|
||||
<div class="workbench-container inner h-full">
|
||||
<div class="workbench-container" style:flex-direction={'row'}>
|
||||
<div class="workbench-container inner">
|
||||
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
||||
{#if currentApplication && currentApplication.component}
|
||||
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
||||
@ -296,7 +300,7 @@
|
||||
{#if asideId}
|
||||
{@const asideComponent = navigatorModel?.aside ?? currentApplication?.aside}
|
||||
{#if asideComponent !== undefined}
|
||||
<Separator name={'workbench'} index={1} />
|
||||
<Separator name={'workbenchGuest'} index={0} />
|
||||
<div class="antiPanel-component antiComponent aside" bind:this={aside}>
|
||||
<Component is={asideComponent} props={{ currentSpace, _id: asideId }} on:close={closeAside} />
|
||||
</div>
|
||||
@ -326,6 +330,14 @@
|
||||
{/await}
|
||||
|
||||
<style lang="scss">
|
||||
.workbench-container {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
touch-action: none;
|
||||
}
|
||||
.version-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { type Resources } from '@hcengineering/platform'
|
||||
import { type DefSeparators } from '@hcengineering/ui'
|
||||
import CreatePublicLink from './components/CreatePublicLink.svelte'
|
||||
import GuestApp from './components/GuestApp.svelte'
|
||||
|
||||
@ -8,3 +9,5 @@ export default async (): Promise<Resources> => ({
|
||||
CreatePublicLink
|
||||
}
|
||||
})
|
||||
|
||||
export const workbenchGuestSeparators: DefSeparators = [null, { minSize: 20, size: 30, maxSize: 50, float: 'aside' }]
|
||||
|
Loading…
Reference in New Issue
Block a user