Board: fix header (#2098)

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2022-06-17 14:22:53 +07:00 committed by GitHub
parent 9d772b786f
commit 6af76d678e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,8 @@
<script lang="ts"> <script lang="ts">
import core, { Ref, Space, WithLookup } from '@anticrm/core' import core, { Ref, Space, WithLookup } from '@anticrm/core'
import { Button, getCurrentLocation, navigate, location, Tooltip, Icon } from '@anticrm/ui' import { Button, getCurrentLocation, navigate, location, Tooltip, Icon } from '@anticrm/ui'
import { createQuery, getClient } from '@anticrm/presentation' import { createQuery } from '@anticrm/presentation'
import { Header, classIcon } from '@anticrm/chunter-resources' import board from '../plugin'
import border from '../plugin'
import { Viewlet } from '@anticrm/view' import { Viewlet } from '@anticrm/view'
import { createEventDispatcher } from 'svelte' import { createEventDispatcher } from 'svelte'
@ -19,8 +18,6 @@
space = result[0] space = result[0]
}) })
const client = getClient()
function showMenu () { function showMenu () {
const loc = getCurrentLocation() const loc = getCurrentLocation()
loc.path[3] = space._id loc.path[3] = space._id
@ -31,7 +28,13 @@
<div class="ac-header divide full"> <div class="ac-header divide full">
{#if space} {#if space}
<Header icon={classIcon(client, space._class)} label={space.name} description={space.description} /> <div class="ac-header__wrap-description">
<div class="ac-header__wrap-title" on:click>
<div class="ac-header__icon"><Icon icon={board.icon.Board} size={'small'} /></div>
<span class="ac-header__title">{space.name}</span>
</div>
<span class="ac-header__description">{space.description}</span>
</div>
{#if viewlets.length > 1} {#if viewlets.length > 1}
<div class="flex"> <div class="flex">
{#each viewlets as v, i} {#each viewlets as v, i}
@ -52,7 +55,7 @@
</div> </div>
{/if} {/if}
{#if showMenuButton} {#if showMenuButton}
<Button label={border.string.ShowMenu} on:click={showMenu} /> <Button label={board.string.ShowMenu} on:click={showMenu} />
{/if} {/if}
{/if} {/if}
</div> </div>