Board: Add labels view (#2047)

* Board: Add labels view

Signed-off-by: Anna No <anna.no@xored.com>

* fix formatting

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2022-06-09 22:28:55 +07:00 committed by GitHub
parent 22021180f6
commit 5d84e5181a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View File

@ -149,6 +149,16 @@ export function createModel (builder: Builder): void {
createComponent: board.component.CreateBoard
}
],
specials: [
{
id: 'labels',
component: board.component.LabelsView,
icon: tags.icon.Tags,
label: board.string.Labels,
createItemLabel: board.string.Labels,
position: 'bottom'
}
],
aside: board.component.BoardMenu
}
},

View File

@ -25,6 +25,7 @@ import { Action, ViewAction, ViewletDescriptor } from '@anticrm/view'
export default mergeIds(boardId, board, {
component: {
CreateBoard: '' as AnyComponent,
LabelsView: '' as AnyComponent,
CreateCard: '' as AnyComponent,
KanbanCard: '' as AnyComponent,
CardPresenter: '' as AnyComponent,

View File

@ -0,0 +1,17 @@
<script lang="ts">
import tags from '@anticrm/tags'
import { Component } from '@anticrm/ui'
import board from '../plugin'
</script>
<Component
is={tags.component.TagsView}
props={{
targetClass: board.class.Card,
title: board.string.Labels,
icon: tags.icon.Tags,
item: board.string.Labels,
key: 'labels',
сreateItemLabel: board.string.Labels
}}
/>

View File

@ -24,6 +24,7 @@ import CreateCard from './components/CreateCard.svelte'
import EditCard from './components/EditCard.svelte'
import KanbanCard from './components/KanbanCard.svelte'
import KanbanView from './components/KanbanView.svelte'
import LabelsView from './components/LabelsView.svelte'
import MoveCard from './components/popups/MoveCard.svelte'
import CopyCard from './components/popups/CopyCard.svelte'
import DateRangePicker from './components/popups/DateRangePicker.svelte'
@ -56,6 +57,7 @@ export default async (): Promise<Resources> => ({
component: {
CreateBoard,
CreateCard,
LabelsView,
EditCard,
KanbanCard,
CardPresenter,