From 868e349fdbaf65a48fed2a77d73383bea32ab2d2 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Sun, 29 May 2022 14:31:37 +0700 Subject: [PATCH] Fix attachments popup (#1899) Signed-off-by: Andrey Sobolev --- models/attachment/src/index.ts | 2 ++ .../src/components/AttachmentPopup.svelte | 17 ++++++++++++++--- plugins/view-assets/assets/icons.svg | 5 ++++- plugins/view-assets/src/index.ts | 3 ++- plugins/view/src/index.ts | 3 ++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/models/attachment/src/index.ts b/models/attachment/src/index.ts index d05cd616eb..997254e05c 100644 --- a/models/attachment/src/index.ts +++ b/models/attachment/src/index.ts @@ -129,6 +129,7 @@ export function createModel (builder: Builder): void { }, label: attachment.string.PinAttachment, input: 'focus', + icon: view.icon.Pin, category: attachment.category.Attachments, target: attachment.class.Attachment, context: { @@ -147,6 +148,7 @@ export function createModel (builder: Builder): void { }, label: attachment.string.UnPinAttachment, input: 'focus', + icon: view.icon.Pin, category: attachment.category.Attachments, target: attachment.class.Attachment, context: { diff --git a/plugins/attachment-resources/src/components/AttachmentPopup.svelte b/plugins/attachment-resources/src/components/AttachmentPopup.svelte index fb1b990352..28025a1ade 100644 --- a/plugins/attachment-resources/src/components/AttachmentPopup.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPopup.svelte @@ -17,7 +17,8 @@ import type { Ref, Doc } from '@anticrm/core' import { Table } from '@anticrm/view-resources' - import attachment from '@anticrm/attachment' + import attachment from '../plugin' + import view from '@anticrm/view' export let objectId: Ref export let attachments: number @@ -25,8 +26,18 @@ diff --git a/plugins/view-assets/assets/icons.svg b/plugins/view-assets/assets/icons.svg index 4dea2e5303..d650b7b669 100644 --- a/plugins/view-assets/assets/icons.svg +++ b/plugins/view-assets/assets/icons.svg @@ -56,5 +56,8 @@ - + + + + diff --git a/plugins/view-assets/src/index.ts b/plugins/view-assets/src/index.ts index 702fa52ccb..303d6a1220 100644 --- a/plugins/view-assets/src/index.ts +++ b/plugins/view-assets/src/index.ts @@ -28,7 +28,8 @@ loadMetadata(view.icon, { Open: `${icons}#open`, Setting: `${icons}#setting`, ArrowRight: `${icons}#arrow-right`, - Views: `${icons}#views` + Views: `${icons}#views`, + Pin: `${icons}#pin` }) addStringsLoader(viewId, async (lang: string) => await import(`../lang/${lang}.json`)) diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index 5dc932e226..627ea4edce 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -409,7 +409,8 @@ const view = plugin(viewId, { Setting: '' as Asset, Open: '' as Asset, ArrowRight: '' as Asset, - Views: '' as Asset + Views: '' as Asset, + Pin: '' as Asset }, category: { General: '' as Ref,