From fd717a9d5932fb6e93c069d0a8e58f45102aaabe Mon Sep 17 00:00:00 2001 From: Alex <41288429+Dvinyanin@users.noreply.github.com> Date: Wed, 20 Apr 2022 23:32:37 +0700 Subject: [PATCH] Add WatchCard (#1465) Signed-off-by: Dvinyanin Alexandr --- models/board/src/index.ts | 2 +- models/board/src/plugin.ts | 3 +- plugins/board-assets/lang/en.json | 1 + plugins/board-assets/lang/ru.json | 1 + plugins/board-resources/package.json | 1 + .../src/components/WatchCard.svelte | 29 +++++++++++++++++++ plugins/board-resources/src/index.ts | 4 ++- plugins/board-resources/src/plugin.ts | 1 + 8 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 plugins/board-resources/src/components/WatchCard.svelte diff --git a/models/board/src/index.ts b/models/board/src/index.ts index bf99ebb539..6a905d00e1 100644 --- a/models/board/src/index.ts +++ b/models/board/src/index.ts @@ -425,7 +425,7 @@ export function createModel (builder: Builder): void { label: board.string.Watch, position: 130, type: board.cardActionType.Action, - handler: board.cardActionHandler.Watch + component: board.component.WatchCard }, board.cardAction.Watch ) diff --git a/models/board/src/plugin.ts b/models/board/src/plugin.ts index 3eac1af135..31614448cb 100644 --- a/models/board/src/plugin.ts +++ b/models/board/src/plugin.ts @@ -33,7 +33,8 @@ export default mergeIds(boardId, board, { BoardPresenter: '' as AnyComponent, TemplatesIcon: '' as AnyComponent, Cards: '' as AnyComponent, - KanbanView: '' as AnyComponent + KanbanView: '' as AnyComponent, + WatchCard: '' as AnyComponent }, space: { DefaultBoard: '' as Ref diff --git a/plugins/board-assets/lang/en.json b/plugins/board-assets/lang/en.json index 33feb0fd2c..34a9d7573c 100644 --- a/plugins/board-assets/lang/en.json +++ b/plugins/board-assets/lang/en.json @@ -51,6 +51,7 @@ "Copy": "Copy", "MakeTemplate": "Make Template", "Watch": "Watch", + "Unwatch": "Unwatch", "Archive": "Archive", "SendToBoard": "Send to board", "Delete": "Delete", diff --git a/plugins/board-assets/lang/ru.json b/plugins/board-assets/lang/ru.json index 503897069e..2c54fc552e 100644 --- a/plugins/board-assets/lang/ru.json +++ b/plugins/board-assets/lang/ru.json @@ -51,6 +51,7 @@ "Copy": "Копировать", "MakeTemplate": "Шаблон", "Watch": "Отслеживать", + "Unwatch": "Не отслеживать", "Archive": "Архивировать", "SendToBoard": "Вернуть", "Delete": "Удалить", diff --git a/plugins/board-resources/package.json b/plugins/board-resources/package.json index b458984422..d539c24096 100644 --- a/plugins/board-resources/package.json +++ b/plugins/board-resources/package.json @@ -42,6 +42,7 @@ "@anticrm/task-resources": "~0.6.0", "@anticrm/core": "~0.6.16", "@anticrm/notification": "~0.6.0", + "@anticrm/notification-resources": "~0.6.0", "@anticrm/panel": "~0.6.0", "@anticrm/platform": "~0.6.5", "@anticrm/presentation": "~0.6.2", diff --git a/plugins/board-resources/src/components/WatchCard.svelte b/plugins/board-resources/src/components/WatchCard.svelte new file mode 100644 index 0000000000..de93cd1aa1 --- /dev/null +++ b/plugins/board-resources/src/components/WatchCard.svelte @@ -0,0 +1,29 @@ + + +{#if subscribed} +