mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
UBER-853 Wiki application navigation (#3731)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
cec2cc4f37
commit
e32f41767f
@ -1,6 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||||
// Copyright © 2021 Hardcore Engineering Inc.
|
// Copyright © 2021, 2023 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
@ -45,6 +45,7 @@
|
|||||||
export let isUtils: boolean = true
|
export let isUtils: boolean = true
|
||||||
export let isCustomAttr: boolean = true
|
export let isCustomAttr: boolean = true
|
||||||
export let floatAside = false
|
export let floatAside = false
|
||||||
|
export let allowBack = true
|
||||||
export let allowClose = true
|
export let allowClose = true
|
||||||
export let useMaxWidth: boolean | undefined = undefined
|
export let useMaxWidth: boolean | undefined = undefined
|
||||||
export let isFullSize = false
|
export let isFullSize = false
|
||||||
@ -96,6 +97,7 @@
|
|||||||
bind:withoutTitle
|
bind:withoutTitle
|
||||||
on:open
|
on:open
|
||||||
on:close
|
on:close
|
||||||
|
{allowBack}
|
||||||
{allowClose}
|
{allowClose}
|
||||||
{floatAside}
|
{floatAside}
|
||||||
{embedded}
|
{embedded}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2020 Anticrm Platform Contributors.
|
// Copyright © 2020 Anticrm Platform Contributors.
|
||||||
|
// Copyright © 2023 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
@ -13,18 +14,42 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { IconFolder, IconSize, Label } from '@hcengineering/ui'
|
|
||||||
|
|
||||||
import { Space } from '@hcengineering/core'
|
import { Space } from '@hcengineering/core'
|
||||||
import presentation from '..'
|
import { Asset } from '@hcengineering/platform'
|
||||||
|
import {
|
||||||
|
AnySvelteComponent,
|
||||||
|
Icon,
|
||||||
|
IconFolder,
|
||||||
|
IconSize,
|
||||||
|
IconWithEmoji,
|
||||||
|
Label,
|
||||||
|
getPlatformColorDef,
|
||||||
|
themeStore
|
||||||
|
} from '@hcengineering/ui'
|
||||||
|
import view, { IconProps } from '@hcengineering/view'
|
||||||
|
|
||||||
export let value: Space
|
import presentation from '..'
|
||||||
|
import { ComponentType } from 'svelte'
|
||||||
|
|
||||||
|
export let value: Space & IconProps
|
||||||
export let subtitle: string | undefined = undefined
|
export let subtitle: string | undefined = undefined
|
||||||
export let size: IconSize
|
export let size: IconSize
|
||||||
|
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = view.ids.IconWithEmoji
|
||||||
|
export let defaultIcon: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-presenter">
|
<div class="flex-presenter">
|
||||||
<div class="icon medium-gap"><IconFolder {size} /></div>
|
<div class="icon medium-gap">
|
||||||
|
<Icon
|
||||||
|
{size}
|
||||||
|
icon={value.icon === iconWithEmoji && iconWithEmoji ? IconWithEmoji : value.icon ?? defaultIcon ?? IconFolder}
|
||||||
|
iconProps={value.icon === iconWithEmoji && iconWithEmoji
|
||||||
|
? { icon: value.color }
|
||||||
|
: {
|
||||||
|
fill: value.color !== undefined ? getPlatformColorDef(value.color, $themeStore.dark).icon : 'currentColor'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
{#if subtitle}<div class="content-dark-color text-sm">{subtitle}</div>{/if}
|
{#if subtitle}<div class="content-dark-color text-sm">{subtitle}</div>{/if}
|
||||||
<div class="label no-underline nowrap">
|
<div class="label no-underline nowrap">
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createEventDispatcher, ComponentType } from 'svelte'
|
import { createEventDispatcher, ComponentType } from 'svelte'
|
||||||
|
|
||||||
|
import { Class, DocumentQuery, FindOptions, Ref, Space } from '@hcengineering/core'
|
||||||
import { Asset, IntlString } from '@hcengineering/platform'
|
import { Asset, IntlString } from '@hcengineering/platform'
|
||||||
import { getPlatformColorDef, getPlatformColorForTextDef, IconWithEmoji, themeStore } from '@hcengineering/ui'
|
import { getPlatformColorDef, getPlatformColorForTextDef, IconWithEmoji, themeStore } from '@hcengineering/ui'
|
||||||
import {
|
import {
|
||||||
@ -31,8 +32,7 @@
|
|||||||
showPopup,
|
showPopup,
|
||||||
TooltipAlignment
|
TooltipAlignment
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { Class, DocumentQuery, FindOptions, Ref, Space } from '@hcengineering/core'
|
import view, { IconProps } from '@hcengineering/view'
|
||||||
import { IconProps } from '@hcengineering/view'
|
|
||||||
|
|
||||||
import SpacesPopup from './SpacesPopup.svelte'
|
import SpacesPopup from './SpacesPopup.svelte'
|
||||||
import { ObjectCreate } from '../types'
|
import { ObjectCreate } from '../types'
|
||||||
@ -58,7 +58,7 @@
|
|||||||
export let componentProps: any | undefined = undefined
|
export let componentProps: any | undefined = undefined
|
||||||
export let autoSelect = true
|
export let autoSelect = true
|
||||||
export let readonly = false
|
export let readonly = false
|
||||||
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = view.ids.IconWithEmoji
|
||||||
export let defaultIcon: AnySvelteComponent | Asset | ComponentType = IconFolder
|
export let defaultIcon: AnySvelteComponent | Asset | ComponentType = IconFolder
|
||||||
|
|
||||||
let selected: (Space & IconProps) | undefined
|
let selected: (Space & IconProps) | undefined
|
||||||
@ -98,7 +98,9 @@
|
|||||||
spaceQuery,
|
spaceQuery,
|
||||||
create,
|
create,
|
||||||
component,
|
component,
|
||||||
componentProps
|
componentProps,
|
||||||
|
iconWithEmoji,
|
||||||
|
defaultIcon
|
||||||
},
|
},
|
||||||
!$$slots.content ? eventToHTMLElement(ev) : getEventPositionElement(ev),
|
!$$slots.content ? eventToHTMLElement(ev) : getEventPositionElement(ev),
|
||||||
(result) => {
|
(result) => {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2020 Anticrm Platform Contributors.
|
// Copyright © 2020 Anticrm Platform Contributors.
|
||||||
|
// Copyright © 2023 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
@ -14,9 +15,17 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import core, { Class, Ref, Space } from '@hcengineering/core'
|
import core, { Class, Ref, Space } from '@hcengineering/core'
|
||||||
import type { IntlString } from '@hcengineering/platform'
|
import type { Asset, IntlString } from '@hcengineering/platform'
|
||||||
import { CheckBox, deviceOptionsStore, resizeObserver, tooltip, EditWithIcon, IconSearch } from '@hcengineering/ui'
|
import {
|
||||||
import { createEventDispatcher } from 'svelte'
|
AnySvelteComponent,
|
||||||
|
CheckBox,
|
||||||
|
deviceOptionsStore,
|
||||||
|
resizeObserver,
|
||||||
|
tooltip,
|
||||||
|
EditWithIcon,
|
||||||
|
IconSearch
|
||||||
|
} from '@hcengineering/ui'
|
||||||
|
import { ComponentType, createEventDispatcher } from 'svelte'
|
||||||
import presentation from '..'
|
import presentation from '..'
|
||||||
import { createQuery } from '../utils'
|
import { createQuery } from '../utils'
|
||||||
import SpaceInfo from './SpaceInfo.svelte'
|
import SpaceInfo from './SpaceInfo.svelte'
|
||||||
@ -28,6 +37,8 @@
|
|||||||
export let placeholderParam: any | undefined = undefined
|
export let placeholderParam: any | undefined = undefined
|
||||||
export let selected: Ref<Space> | undefined
|
export let selected: Ref<Space> | undefined
|
||||||
export let selectedSpaces: Ref<Space>[] = []
|
export let selectedSpaces: Ref<Space>[] = []
|
||||||
|
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
||||||
|
export let defaultIcon: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
||||||
|
|
||||||
let searchQuery: string = ''
|
let searchQuery: string = ''
|
||||||
let spaces: Space[] = []
|
let spaces: Space[] = []
|
||||||
@ -97,7 +108,7 @@
|
|||||||
<div class="check pointer-events-none">
|
<div class="check pointer-events-none">
|
||||||
<CheckBox checked={isSelected(space)} accented />
|
<CheckBox checked={isSelected(space)} accented />
|
||||||
</div>
|
</div>
|
||||||
<SpaceInfo size={'medium'} value={space} />
|
<SpaceInfo size={'medium'} value={space} {iconWithEmoji} {defaultIcon} />
|
||||||
{#if allowDeselect && space._id === selected}
|
{#if allowDeselect && space._id === selected}
|
||||||
<div class="check pointer-events-none">
|
<div class="check pointer-events-none">
|
||||||
{#if titleDeselect}
|
{#if titleDeselect}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2020 Anticrm Platform Contributors.
|
// Copyright © 2020 Anticrm Platform Contributors.
|
||||||
|
// Copyright © 2023 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
@ -14,11 +15,13 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Class, Doc, DocumentQuery, FindOptions, Ref, Space, getCurrentAccount } from '@hcengineering/core'
|
import { Class, Doc, DocumentQuery, FindOptions, Ref, Space, getCurrentAccount } from '@hcengineering/core'
|
||||||
|
import { Asset } from '@hcengineering/platform'
|
||||||
import { AnySvelteComponent, ButtonSize } from '@hcengineering/ui'
|
import { AnySvelteComponent, ButtonSize } from '@hcengineering/ui'
|
||||||
import { ObjectCreate } from '../types'
|
import { ObjectCreate } from '../types'
|
||||||
import { createQuery } from '../utils'
|
import { createQuery } from '../utils'
|
||||||
import DocPopup from './DocPopup.svelte'
|
import DocPopup from './DocPopup.svelte'
|
||||||
import SpaceInfo from './SpaceInfo.svelte'
|
import SpaceInfo from './SpaceInfo.svelte'
|
||||||
|
import { ComponentType } from 'svelte'
|
||||||
|
|
||||||
export let _class: Ref<Class<Space>>
|
export let _class: Ref<Class<Space>>
|
||||||
export let selected: Ref<Space> | undefined
|
export let selected: Ref<Space> | undefined
|
||||||
@ -29,6 +32,8 @@
|
|||||||
export let allowDeselect = false
|
export let allowDeselect = false
|
||||||
export let component: AnySvelteComponent | undefined = undefined
|
export let component: AnySvelteComponent | undefined = undefined
|
||||||
export let componentProps: any | undefined = undefined
|
export let componentProps: any | undefined = undefined
|
||||||
|
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
||||||
|
export let defaultIcon: AnySvelteComponent | Asset | ComponentType | undefined = undefined
|
||||||
|
|
||||||
let search: string | undefined = undefined
|
let search: string | undefined = undefined
|
||||||
|
|
||||||
@ -78,7 +83,7 @@
|
|||||||
{#if component}
|
{#if component}
|
||||||
<svelte:component this={component} {...componentProps} {size} value={space} />
|
<svelte:component this={component} {...componentProps} {size} value={space} />
|
||||||
{:else}
|
{:else}
|
||||||
<SpaceInfo {size} value={space} />
|
<SpaceInfo {size} value={space} {iconWithEmoji} {defaultIcon} />
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</DocPopup>
|
</DocPopup>
|
||||||
|
@ -176,6 +176,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.an-element__icon-arrow {
|
.an-element__icon-arrow {
|
||||||
|
flex-shrink: 0;
|
||||||
margin-left: .25rem;
|
margin-left: .25rem;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2022 Hardcore Engineering Inc.
|
// Copyright © 2022, 2023 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
@ -32,6 +32,7 @@
|
|||||||
export let isFullSize: boolean = false
|
export let isFullSize: boolean = false
|
||||||
export let withoutTitle: boolean = false
|
export let withoutTitle: boolean = false
|
||||||
export let floatAside = false
|
export let floatAside = false
|
||||||
|
export let allowBack = true
|
||||||
export let allowClose = true
|
export let allowClose = true
|
||||||
export let useMaxWidth: boolean | undefined = undefined
|
export let useMaxWidth: boolean | undefined = undefined
|
||||||
export let embedded = false
|
export let embedded = false
|
||||||
@ -96,15 +97,17 @@
|
|||||||
class:embedded
|
class:embedded
|
||||||
>
|
>
|
||||||
<div class="popupPanel-title {twoRows && !withoutTitle ? 'row-top' : 'row'}">
|
<div class="popupPanel-title {twoRows && !withoutTitle ? 'row-top' : 'row'}">
|
||||||
<Button
|
{#if allowBack}
|
||||||
focusIndex={10000}
|
<Button
|
||||||
icon={IconBack}
|
focusIndex={10000}
|
||||||
kind={'ghost'}
|
icon={IconBack}
|
||||||
size={'medium'}
|
kind={'ghost'}
|
||||||
on:click={() => {
|
size={'medium'}
|
||||||
history.back()
|
on:click={() => {
|
||||||
}}
|
history.back()
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
{#if allowClose}
|
{#if allowClose}
|
||||||
<div class="antiHSpacer" />
|
<div class="antiHSpacer" />
|
||||||
<Button
|
<Button
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
function chooseIcon (ev: MouseEvent) {
|
function chooseIcon (ev: MouseEvent) {
|
||||||
const icons = [tracker.icon.Home, tracker.icon.RedCircle]
|
const icons = [tracker.icon.Home, tracker.icon.RedCircle]
|
||||||
showPopup(IconPicker, { icon, color, icons, emoji: tracker.component.IconWithEmoji }, 'top', (result) => {
|
showPopup(IconPicker, { icon, color, icons, iconWithEmoji: tracker.component.IconWithEmoji }, 'top', (result) => {
|
||||||
if (result !== undefined && result !== null) {
|
if (result !== undefined && result !== null) {
|
||||||
icon = result.icon
|
icon = result.icon
|
||||||
color = result.color
|
color = result.color
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
export let icon: Metadata<string> | undefined = undefined
|
export let icon: Metadata<string> | undefined = undefined
|
||||||
export let icons: Asset[]
|
export let icons: Asset[]
|
||||||
export let emoji: Asset = view.ids.IconWithEmoji
|
export let iconWithEmoji: Asset = view.ids.IconWithEmoji
|
||||||
export let color: number = 0
|
export let color: number = 0
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<EmojiPopup
|
<EmojiPopup
|
||||||
embedded
|
embedded
|
||||||
on:close={(evt) => {
|
on:close={(evt) => {
|
||||||
dispatch('close', { icon: emoji, color: evt.detail.codePointAt(0) })
|
dispatch('close', { icon: iconWithEmoji, color: evt.detail.codePointAt(0) })
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
export let model: NavigatorModel | undefined
|
export let model: NavigatorModel | undefined
|
||||||
export let currentSpace: Ref<Space> | undefined
|
export let currentSpace: Ref<Space> | undefined
|
||||||
export let currentSpecial: string | undefined
|
export let currentSpecial: string | undefined
|
||||||
|
export let currentFragment: string | undefined
|
||||||
export let currentApplication: Application | undefined
|
export let currentApplication: Application | undefined
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
@ -169,6 +170,7 @@
|
|||||||
on:space
|
on:space
|
||||||
{currentSpace}
|
{currentSpace}
|
||||||
{currentSpecial}
|
{currentSpecial}
|
||||||
|
{currentFragment}
|
||||||
deselect={menuSelection}
|
deselect={menuSelection}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
@ -182,6 +184,7 @@
|
|||||||
model={m}
|
model={m}
|
||||||
on:open
|
on:open
|
||||||
{currentSpecial}
|
{currentSpecial}
|
||||||
|
{currentFragment}
|
||||||
deselect={menuSelection}
|
deselect={menuSelection}
|
||||||
separate
|
separate
|
||||||
/>
|
/>
|
||||||
|
@ -707,10 +707,7 @@
|
|||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
on:click|stopPropagation={() => showPopup(AccountPopup, {}, popupPosition)}
|
on:click|stopPropagation={() => showPopup(AccountPopup, {}, popupPosition)}
|
||||||
>
|
>
|
||||||
<Component
|
<Component is={contact.component.Avatar} props={{ avatar: employee?.avatar, size: 'small' }} />
|
||||||
is={contact.component.Avatar}
|
|
||||||
props={{ avatar: employee?.avatar, size: 'small', name: employee?.name }}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -732,7 +729,16 @@
|
|||||||
{#await checkIsHeaderHidden(currentApplication) then isHidden}
|
{#await checkIsHeaderHidden(currentApplication) then isHidden}
|
||||||
{#if !isHidden}
|
{#if !isHidden}
|
||||||
{#await checkIsHeaderDisabled(currentApplication) then disabled}
|
{#await checkIsHeaderDisabled(currentApplication) then disabled}
|
||||||
<Component is={currentApplication.navHeaderComponent} props={{ currentSpace, disabled }} shrink />
|
<Component
|
||||||
|
is={currentApplication.navHeaderComponent}
|
||||||
|
props={{
|
||||||
|
currentSpace,
|
||||||
|
currentSpecial,
|
||||||
|
currentFragment,
|
||||||
|
disabled
|
||||||
|
}}
|
||||||
|
shrink
|
||||||
|
/>
|
||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
@ -741,6 +747,7 @@
|
|||||||
<Navigator
|
<Navigator
|
||||||
{currentSpace}
|
{currentSpace}
|
||||||
{currentSpecial}
|
{currentSpecial}
|
||||||
|
{currentFragment}
|
||||||
model={navigatorModel}
|
model={navigatorModel}
|
||||||
{currentApplication}
|
{currentApplication}
|
||||||
on:open={checkOnHide}
|
on:open={checkOnHide}
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
export let currentSpace: Ref<Space> | undefined
|
export let currentSpace: Ref<Space> | undefined
|
||||||
export let spaces: Space[]
|
export let spaces: Space[]
|
||||||
export let currentSpecial: string | undefined
|
export let currentSpecial: string | undefined
|
||||||
|
export let currentFragment: string | undefined
|
||||||
export let hasSpaceBrowser: boolean = false
|
export let hasSpaceBrowser: boolean = false
|
||||||
export let deselect: boolean = false
|
export let deselect: boolean = false
|
||||||
export let separate: boolean = false
|
export let separate: boolean = false
|
||||||
@ -151,7 +152,16 @@
|
|||||||
{#await getSpacePresenter(client, space._class) then presenter}
|
{#await getSpacePresenter(client, space._class) then presenter}
|
||||||
{#if separate && model.specials && i !== 0}<TreeSeparator line />{/if}
|
{#if separate && model.specials && i !== 0}<TreeSeparator line />{/if}
|
||||||
{#if model.specials && presenter}
|
{#if model.specials && presenter}
|
||||||
<svelte:component this={presenter} {space} {model} {currentSpace} {currentSpecial} {getActions} {deselect} />
|
<svelte:component
|
||||||
|
this={presenter}
|
||||||
|
{space}
|
||||||
|
{model}
|
||||||
|
{currentSpace}
|
||||||
|
{currentSpecial}
|
||||||
|
{currentFragment}
|
||||||
|
{getActions}
|
||||||
|
{deselect}
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<NavLink space={space._id}>
|
<NavLink space={space._id}>
|
||||||
{#await getSpaceName(client, space) then name}
|
{#await getSpaceName(client, space) then name}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
export let models: SpacesNavModel[]
|
export let models: SpacesNavModel[]
|
||||||
export let currentSpace: Ref<Space> | undefined
|
export let currentSpace: Ref<Space> | undefined
|
||||||
export let currentSpecial: string | undefined
|
export let currentSpecial: string | undefined
|
||||||
|
export let currentFragment: string | undefined
|
||||||
export let deselect: boolean = false
|
export let deselect: boolean = false
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
@ -93,7 +94,16 @@
|
|||||||
{@const model = models.find((p) => p.spaceClass === space._class)}
|
{@const model = models.find((p) => p.spaceClass === space._class)}
|
||||||
{#await getSpacePresenter(client, space._class) then presenter}
|
{#await getSpacePresenter(client, space._class) then presenter}
|
||||||
{#if presenter && model}
|
{#if presenter && model}
|
||||||
<svelte:component this={presenter} {space} {model} {currentSpace} {currentSpecial} {getActions} {deselect} />
|
<svelte:component
|
||||||
|
this={presenter}
|
||||||
|
{space}
|
||||||
|
{model}
|
||||||
|
{currentSpace}
|
||||||
|
{currentSpecial}
|
||||||
|
{currentFragment}
|
||||||
|
{getActions}
|
||||||
|
{deselect}
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
{#await getSpaceName(client, space) then name}
|
{#await getSpaceName(client, space) then name}
|
||||||
<NavLink space={space._id}>
|
<NavLink space={space._id}>
|
||||||
|
Loading…
Reference in New Issue
Block a user