diff --git a/models/board/src/index.ts b/models/board/src/index.ts index a4cea3329f..693d89645d 100644 --- a/models/board/src/index.ts +++ b/models/board/src/index.ts @@ -342,7 +342,7 @@ export function createModel (builder: Builder): void { core.space.Model, { icon: board.icon.Card, - isInline: false, + isInline: true, label: board.string.Cover, position: 70, type: board.cardActionType.Cover, diff --git a/plugins/board-resources/src/components/KanbanCard.svelte b/plugins/board-resources/src/components/KanbanCard.svelte index 93df09c519..0d043cbc57 100644 --- a/plugins/board-resources/src/components/KanbanCard.svelte +++ b/plugins/board-resources/src/components/KanbanCard.svelte @@ -21,11 +21,11 @@ import type { Ref, WithLookup } from '@anticrm/core' import notification from '@anticrm/notification' import { getClient, UserBoxList } from '@anticrm/presentation' - import { Button, Component, IconEdit, Label, showPanel, showPopup } from '@anticrm/ui' - import { ContextMenu } from '@anticrm/view-resources' + import { Button, Component, EditBox, IconEdit, Label, showPanel, showPopup } from '@anticrm/ui' import board from '../plugin' - import { hasDate } from '../utils/CardUtils' + import { hasDate, updateCard } from '../utils/CardUtils' import { getElementPopupAlignment } from '../utils/PopupUtils' + import CardInlineActions from './editor/CardInlineActions.svelte' import CardLabels from './editor/CardLabels.svelte' import DatePresenter from './presenters/DatePresenter.svelte' @@ -37,9 +37,20 @@ let ref: HTMLElement const client = getClient() + let isEditMode = false - function showMenu (): void { - showPopup(ContextMenu, { object }, getElementPopupAlignment(ref, { h: 'right', v: 'top' })) + function exitEditMode (): void { + isEditMode = false + } + + function enterEditMode (): void { + isEditMode = true + showPopup( + CardInlineActions, + { value: object }, + getElementPopupAlignment(ref, { h: 'right', v: 'top' }), + exitEditMode + ) } function showCard () { @@ -80,22 +91,34 @@