mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-27 10:49:44 +00:00
Fix formatting issues (#1617)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
be49938461
commit
e253148103
@ -1,29 +1,33 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Ref, Space } from '@anticrm/core'
|
import { Ref, Space } from '@anticrm/core'
|
||||||
import { Button } from '@anticrm/ui'
|
import { Button } from '@anticrm/ui'
|
||||||
import board from '../plugin'
|
import board from '../plugin'
|
||||||
import CardsArchive from './CardArchive.svelte'
|
import CardsArchive from './CardArchive.svelte'
|
||||||
import ListArchive from './ListArchive.svelte'
|
import ListArchive from './ListArchive.svelte'
|
||||||
import TextArea from '@anticrm/ui/src/components/TextArea.svelte'
|
import TextArea from '@anticrm/ui/src/components/TextArea.svelte'
|
||||||
|
|
||||||
export let space: Ref<Space>
|
export let space: Ref<Space>
|
||||||
|
|
||||||
let isCardArchive = true
|
let isCardArchive = true
|
||||||
let search: string = ''
|
let search: string = ''
|
||||||
$: query = { space, title: { $like: '%' + search + '%' } }
|
$: query = { space, title: { $like: '%' + search + '%' } }
|
||||||
$: label = isCardArchive
|
$: label = isCardArchive ? board.string.SwitchToLists : board.string.SwitchToCards
|
||||||
? board.string.SwitchToLists
|
|
||||||
: board.string.SwitchToCards
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<Button {label} width={'100%'} on:click={() => { isCardArchive = !isCardArchive }} />
|
<Button
|
||||||
<div class="pt-4">
|
{label}
|
||||||
<TextArea bind:value={search} placeholder={board.string.SearchArchive}/>
|
width={'100%'}
|
||||||
</div>
|
on:click={() => {
|
||||||
|
isCardArchive = !isCardArchive
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div class="pt-4">
|
||||||
|
<TextArea bind:value={search} placeholder={board.string.SearchArchive} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#if isCardArchive}
|
{#if isCardArchive}
|
||||||
<CardsArchive {query}/>
|
<CardsArchive {query} />
|
||||||
{:else}
|
{:else}
|
||||||
<ListArchive {query}/>
|
<ListArchive {query} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
let space: Space
|
let space: Space
|
||||||
const query = createQuery()
|
const query = createQuery()
|
||||||
$: query.query(core.class.Space, { _id: spaceId }, result => { space = result[0] })
|
$: query.query(core.class.Space, { _id: spaceId }, (result) => {
|
||||||
|
space = result[0]
|
||||||
|
})
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
|
||||||
@ -22,7 +24,7 @@
|
|||||||
|
|
||||||
<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}/>
|
<Header icon={classIcon(client, space._class)} label={space.name} description={space.description} />
|
||||||
<Button label={border.string.ShowMenu} on:click={showMenu}/>
|
<Button label={border.string.ShowMenu} on:click={showMenu} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,52 +1,53 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Ref, Space } from '@anticrm/core'
|
import { Ref, Space } from '@anticrm/core'
|
||||||
import Label from '@anticrm/ui/src/components/Label.svelte'
|
import Label from '@anticrm/ui/src/components/Label.svelte'
|
||||||
import board from '../plugin'
|
import board from '../plugin'
|
||||||
import { createQuery } from '@anticrm/presentation'
|
import { createQuery } from '@anticrm/presentation'
|
||||||
import { MenuPage } from '@anticrm/board'
|
import { MenuPage } from '@anticrm/board'
|
||||||
import { Button, Component, IconBack, IconClose } from '@anticrm/ui'
|
import { Button, Component, IconBack, IconClose } from '@anticrm/ui'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
|
|
||||||
export let currentSpace: Ref<Space> | undefined
|
export let currentSpace: Ref<Space> | undefined
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
let currentPageId = board.menuPageId.Main
|
let currentPageId = board.menuPageId.Main
|
||||||
let trace: string[] = []
|
let trace: string[] = []
|
||||||
let page: MenuPage
|
let page: MenuPage
|
||||||
const query = createQuery()
|
const query = createQuery()
|
||||||
$: query.query(board.class.MenuPage, { pageId: currentPageId }, result => {
|
$: query.query(board.class.MenuPage, { pageId: currentPageId }, (result) => {
|
||||||
;[page] = result
|
;[page] = result
|
||||||
})
|
})
|
||||||
function setKey (e: CustomEvent) {
|
function setKey (e: CustomEvent) {
|
||||||
trace = [currentPageId, ...trace]
|
trace = [currentPageId, ...trace]
|
||||||
currentPageId = e.detail
|
currentPageId = e.detail
|
||||||
}
|
}
|
||||||
function onBack () {
|
function onBack () {
|
||||||
[currentPageId = board.menuPageId.Main, ...trace] = trace
|
;[currentPageId = board.menuPageId.Main, ...trace] = trace
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if page}
|
{#if page}
|
||||||
<div class="ac-header flex-between w-full divide">
|
<div class="ac-header flex-between w-full divide">
|
||||||
{#if trace.length}
|
{#if trace.length}
|
||||||
<Button icon={IconBack} kind="transparent" size="x-large" on:click={onBack} />
|
<Button icon={IconBack} kind="transparent" size="x-large" on:click={onBack} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="ml-12"/>
|
<div class="ml-12" />
|
||||||
{/if}
|
|
||||||
<div class="flex-center fs-title">
|
|
||||||
<Label label={page.label} />
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
icon={IconClose}
|
|
||||||
kind="transparent"
|
|
||||||
size="x-large"
|
|
||||||
on:click={() => {
|
|
||||||
dispatch('close')
|
|
||||||
}} />
|
|
||||||
</div>
|
|
||||||
{#if currentSpace}
|
|
||||||
<div class="vScroll mb-4">
|
|
||||||
<Component is={page.component} props={{ space: currentSpace }} on:change={setKey}/>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="flex-center fs-title">
|
||||||
|
<Label label={page.label} />
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
icon={IconClose}
|
||||||
|
kind="transparent"
|
||||||
|
size="x-large"
|
||||||
|
on:click={() => {
|
||||||
|
dispatch('close')
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{#if currentSpace}
|
||||||
|
<div class="vScroll mb-4">
|
||||||
|
<Component is={page.component} props={{ space: currentSpace }} on:change={setKey} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button } from '@anticrm/ui'
|
import { Button } from '@anticrm/ui'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
import board from '@anticrm/board'
|
import board from '@anticrm/board'
|
||||||
import plugin from '../plugin'
|
import plugin from '../plugin'
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<Button label={plugin.string.Archive} width={'100%'} on:click={() => { dispatch('change', board.menuPageId.Archive) }} />
|
<Button
|
||||||
|
label={plugin.string.Archive}
|
||||||
|
width={'100%'}
|
||||||
|
on:click={() => {
|
||||||
|
dispatch('change', board.menuPageId.Archive)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user