swithc viewlets

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-09-06 10:40:20 +02:00
parent 4bb2f869bf
commit c20ddfd20b
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
3 changed files with 6 additions and 3 deletions

View File

@ -57,6 +57,7 @@
{#await buildModel(client, _class, config, options)}
<Loading/>
{:then model}
KANBAN
<div class="container">
<ScrollBox vertical stretch noShift>
<table class="table-body">

View File

@ -17,12 +17,14 @@ import StringEditor from './components/StringEditor.svelte'
import StringPresenter from './components/StringPresenter.svelte'
import StatePresenter from './components/StatePresenter.svelte'
import TableView from './components/TableView.svelte'
import KanbanView from './components/KanbanView.svelte'
export default async () => ({
component: {
StringEditor,
StringPresenter,
StatePresenter,
TableView
TableView,
KanbanView
},
})

View File

@ -54,8 +54,8 @@ let selected = 0
<div class="flex">
{#each viewlets as viewlet, i}
<div class="btn" class:selected>
<div class="icon"><Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'}/></div>
<div class="btn" class:selected={selected === i}>
<div class="icon" on:click={()=>{ selected = i }}><Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'}/></div>
</div>
{/each}
</div>