diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 4b8fc972f2..2fc632919c 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -420,6 +420,7 @@ p:last-child { margin-block-end: 0; } .w-9 { width: 2.25rem; } .w-14 { width: 3.5rem; } .w-16 { width: 4rem; } +.w-60 { width: 15rem; } .w-85 { width: 21.25rem; } .w-165 { width: 41.25rem; } .min-w-0 { min-width: 0; } diff --git a/plugins/attachment-resources/src/components/AddAttachment.svelte b/plugins/attachment-resources/src/components/AddAttachment.svelte index 2fe19c89be..e139499301 100644 --- a/plugins/attachment-resources/src/components/AddAttachment.svelte +++ b/plugins/attachment-resources/src/components/AddAttachment.svelte @@ -16,6 +16,7 @@ import { Class, Doc, Ref, Space } from '@anticrm/core' import { getClient } from '@anticrm/presentation' import { CircleButton, IconAdd } from '@anticrm/ui' + import { createEventDispatcher } from 'svelte' import { createAttachments } from '../utils' export let loading: number = 0 @@ -26,6 +27,7 @@ export let space: Ref const client = getClient() + const dispatch = createEventDispatcher() async function fileSelected() { const list = inputFile.files @@ -37,6 +39,8 @@ } finally { loading-- } + + dispatch('attached') } function openFile() { diff --git a/plugins/board-assets/lang/en.json b/plugins/board-assets/lang/en.json index 34a9d7573c..8052d7da25 100644 --- a/plugins/board-assets/lang/en.json +++ b/plugins/board-assets/lang/en.json @@ -41,6 +41,9 @@ "Attachments": "Attachments", "AddAttachment": "Add an attachment", "DropFileToUpload": "Drop files to upload.", + "AttachFrom": "Attach from...", + "AttachmentTip": "Tip: You can drag and drop files onto cards to upload them.", + "Computer": "Computer", "CustomFields": "Custom Fields", "Automation": "Automation", "AddButton": "Add Button", diff --git a/plugins/board-assets/lang/ru.json b/plugins/board-assets/lang/ru.json index 2c54fc552e..a32917bab4 100644 --- a/plugins/board-assets/lang/ru.json +++ b/plugins/board-assets/lang/ru.json @@ -41,6 +41,9 @@ "Attachments": "Прикрепленное", "AddAttachment": "Прикрепить", "DropFileToUpload": "Добавьте файлы.", + "AttachFrom": "Добавить из...", + "AttachmentTip": "Совет: Вы можете перетаскивать файлы на карточки, чтобы прикрепить их.", + "Computer": "Компьютер", "CustomFields": "Дополнительно", "Automation": "Автоматизация", "AddButton": "Добавить", diff --git a/plugins/board-resources/src/components/EditCard.svelte b/plugins/board-resources/src/components/EditCard.svelte index ec13ead43f..7f3f20a4b9 100644 --- a/plugins/board-resources/src/components/EditCard.svelte +++ b/plugins/board-resources/src/components/EditCard.svelte @@ -41,7 +41,7 @@ let object: Card | undefined let state: State | undefined - let handleMove: () => void + let handleMove: (e: Event) => void $: cardQuery.query(_class, { _id }, async (result) => { object = result[0] @@ -55,9 +55,9 @@ getCardActions(client, { _id: board.cardAction.Move }).then(async (result) => { if (result[0]?.handler) { const handler = await getResource(result[0].handler) - handleMove = () => { + handleMove = (e) => { if (object) { - handler(object, client) + handler(object, client, e) } } } diff --git a/plugins/board-resources/src/components/editor/CardAttachments.svelte b/plugins/board-resources/src/components/editor/CardAttachments.svelte index f7cdade4b7..03e6cfded2 100644 --- a/plugins/board-resources/src/components/editor/CardAttachments.svelte +++ b/plugins/board-resources/src/components/editor/CardAttachments.svelte @@ -15,8 +15,8 @@ --> @@ -52,11 +60,7 @@ {/each}
- - -
diff --git a/plugins/board-resources/src/components/editor/CardDetails.svelte b/plugins/board-resources/src/components/editor/CardDetails.svelte index 7ed67bb848..516263e9b9 100644 --- a/plugins/board-resources/src/components/editor/CardDetails.svelte +++ b/plugins/board-resources/src/components/editor/CardDetails.svelte @@ -31,8 +31,8 @@ const query = createQuery() const client = getClient() let members: Employee[] - let membersHandler: () => void - let dateHandler: () => void + let membersHandler: (e: Event) => void + let dateHandler: (e: Event) => void $: membersIds = members?.map(m => m._id) ?? [] @@ -71,9 +71,9 @@ if (action.handler) { const handler = await getResource(action.handler) if (action._id === board.cardAction.Dates) { - dateHandler = () => handler(value, client) + dateHandler = (e) => handler(value, client, e) } else if (action._id === board.cardAction.Members) { - membersHandler = () => handler(value, client) + membersHandler = (e) => handler(value, client, e) } } } diff --git a/plugins/board-resources/src/components/editor/CardLabels.svelte b/plugins/board-resources/src/components/editor/CardLabels.svelte index 2d2f7906e8..bc50965a3f 100644 --- a/plugins/board-resources/src/components/editor/CardLabels.svelte +++ b/plugins/board-resources/src/components/editor/CardLabels.svelte @@ -28,7 +28,7 @@ const client = getClient() let labels: CardLabel[] - let labelsHandler: () => void + let labelsHandler: (e: Event) => void let isCompact: boolean = false let isHovered: boolean = false @@ -46,7 +46,7 @@ }).then(async (result) => { if (result?.[0]?.handler) { const handler = await getResource(result[0].handler) - labelsHandler = () => handler(value, client) + labelsHandler = (e: Event) => handler(value, client, e) } }) } diff --git a/plugins/board-resources/src/components/popups/AttachmentPicker.svelte b/plugins/board-resources/src/components/popups/AttachmentPicker.svelte new file mode 100644 index 0000000000..7a37fd1843 --- /dev/null +++ b/plugins/board-resources/src/components/popups/AttachmentPicker.svelte @@ -0,0 +1,54 @@ + + +
+
+
+
+
+
+
+
+
+ + +
+
+
+
\ No newline at end of file diff --git a/plugins/board-resources/src/components/popups/CardLabelsEditor.svelte b/plugins/board-resources/src/components/popups/CardLabelsEditor.svelte index 863ad8e2b1..6339470775 100644 --- a/plugins/board-resources/src/components/popups/CardLabelsEditor.svelte +++ b/plugins/board-resources/src/components/popups/CardLabelsEditor.svelte @@ -82,15 +82,15 @@
-
-
+
+
-
+
-
+