diff --git a/plugins/guest-resources/src/components/Guest.svelte b/plugins/guest-resources/src/components/Guest.svelte index 5893cf5879..7004a28a40 100644 --- a/plugins/guest-resources/src/components/Guest.svelte +++ b/plugins/guest-resources/src/components/Guest.svelte @@ -115,7 +115,6 @@ let currentSpace: Ref | undefined let currentSpecial: string | undefined let specialComponent: SpecialNavModel | undefined - let asideId: string | undefined let currentFragment: string | undefined = '' let currentApplication: Application | undefined @@ -124,13 +123,10 @@ function setSpaceSpecial (spaceSpecial: string | undefined): void { if (currentSpecial !== undefined && spaceSpecial === currentSpecial) return - if (asideId !== undefined && spaceSpecial === asideId) return if (spaceSpecial === undefined) return specialComponent = getSpecialComponent(spaceSpecial) if (specialComponent !== undefined) { currentSpecial = spaceSpecial - } else if (navigatorModel?.aside !== undefined || currentApplication?.aside !== undefined) { - asideId = spaceSpecial } } @@ -175,10 +171,6 @@ } } - if (special !== currentSpecial && (navigatorModel?.aside || currentApplication?.aside)) { - asideId = special - } - if (fragment !== currentFragment) { currentFragment = fragment if (fragment != null && fragment.trim().length > 0) { @@ -250,13 +242,6 @@ } } - function closeAside (): void { - const loc = getLocation() - loc.path.length = 4 - asideId = undefined - navigate(loc) - } - async function getWindowTitle (loc: Location): Promise { if (loc.fragment == null) return const hierarchy = client.getHierarchy() @@ -277,7 +262,6 @@ defineSeparators('workbenchGuest', workbenchGuestSeparators) - let aside: HTMLElement let cover: HTMLElement @@ -303,15 +287,6 @@ {/if} - {#if asideId} - {@const asideComponent = navigatorModel?.aside ?? currentApplication?.aside} - {#if asideComponent !== undefined} - -
- -
- {/if} - {/if}
diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 172131dc21..62e0dcb8ef 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -136,7 +136,6 @@ let currentSpecial: string | undefined let currentQuery: Record | undefined let specialComponent: SpecialNavModel | undefined - let asideId: string | undefined let currentFragment: string | undefined = '' let currentApplication: Application | undefined @@ -374,8 +373,6 @@ loc.path[4] = currentSpecial } else if (loc.path[3] === resolved.defaultLocation.path[3]) { loc.path[4] = resolved.defaultLocation.path[4] - } else { - loc.path[4] = asideId as string } } else { loc.path.length = 4 @@ -512,10 +509,6 @@ } } - if (special !== currentSpecial && (navigatorModel?.aside || currentApplication?.aside)) { - asideId = special - } - if (app !== undefined) { localStorage.setItem(`${locationStorageKeyId}_${app}`, originalLoc) } @@ -589,21 +582,12 @@ specialComponent = undefined // eslint-disable-next-line no-fallthrough case 3: - asideId = undefined if (currentSpace !== undefined) { specialComponent = undefined } } } - function closeAside (): void { - const loc = getLocation() - loc.path.length = 4 - asideId = undefined - checkOnHide() - navigate(loc) - } - async function updateSpace (spaceId?: Ref): Promise { if (spaceId === currentSpace) return clear(2) @@ -620,14 +604,11 @@ function setSpaceSpecial (spaceSpecial: string | undefined): void { if (currentSpecial !== undefined && spaceSpecial === currentSpecial) return - if (asideId !== undefined && spaceSpecial === asideId) return clear(3) if (spaceSpecial === undefined) return specialComponent = getSpecialComponent(spaceSpecial) if (specialComponent !== undefined) { currentSpecial = spaceSpecial - } else if (navigatorModel?.aside !== undefined || currentApplication?.aside !== undefined) { - asideId = spaceSpecial } } @@ -647,7 +628,6 @@ } } - let aside: HTMLElement let cover: HTMLElement let workbenchWidth: number = $deviceInfo.docWidth @@ -762,14 +742,6 @@ person && client.getHierarchy().hasMixin(person, contact.mixin.Employee) ? !client.getHierarchy().as(person, contact.mixin.Employee).active : false - - let asideComponent: AnyComponent | undefined - - $: if (asideId !== undefined && navigatorModel !== undefined) { - asideComponent = navigatorModel?.aside ?? currentApplication?.aside - } else { - asideComponent = undefined - } {#if person && deactivated && !isAdminUser()} @@ -1001,11 +973,8 @@ {:else if specialComponent} {/if}
- {#if asideComponent !== undefined} - -
- -
- {/if} {#if !$deviceInfo.aside.float} {#if $sidebarStore.variant === SidebarVariant.EXPANDED} diff --git a/plugins/workbench-resources/src/utils.ts b/plugins/workbench-resources/src/utils.ts index dffc7b52d1..c36a0d9dc1 100644 --- a/plugins/workbench-resources/src/utils.ts +++ b/plugins/workbench-resources/src/utils.ts @@ -192,8 +192,7 @@ export async function buildNavModel ( const newSpaces = (nm.spaces ?? []).filter((it) => !spaces.some((sp) => sp.id === it.id)) newNavModel = { spaces: [...spaces, ...newSpaces], - specials: [...(newNavModel?.specials ?? []), ...(nm.specials ?? [])], - aside: newNavModel?.aside ?? nm?.aside + specials: [...(newNavModel?.specials ?? []), ...(nm.specials ?? [])] } } } diff --git a/plugins/workbench/src/index.ts b/plugins/workbench/src/index.ts index 86b377ba68..15a8da28f3 100644 --- a/plugins/workbench/src/index.ts +++ b/plugins/workbench/src/index.ts @@ -50,7 +50,6 @@ export interface Application extends Doc { // Also attached ApplicationNavModel will be joined after this one main. navigatorModel?: NavigatorModel - aside?: AnyComponent locationResolver?: Resource<(loc: Location) => Promise> locationDataResolver?: Resource<(loc: Location) => Promise> @@ -130,7 +129,6 @@ export interface ApplicationNavModel extends Doc { spaces?: SpacesNavModel[] specials?: SpecialNavModel[] - aside?: AnyComponent } /** @@ -163,7 +161,6 @@ export interface SpacesNavModel { export interface NavigatorModel { spaces: SpacesNavModel[] specials?: SpecialNavModel[] - aside?: AnyComponent } /**