From 342acb5bb88e949bef79eab6ef53dad369ea2b03 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Thu, 5 May 2022 17:34:27 +0300 Subject: [PATCH] Fix 1630. UI fixes. (#1651) Signed-off-by: Alexander Platov --- packages/theme/styles/components.scss | 5 +- .../activity-assets/src/tsdoc-metadata.json | 22 +++--- .../src/components/AttachmentPresenter.svelte | 9 ++- .../src/components/AttachmentRefInput.svelte | 47 ++++-------- plugins/gmail-assets/src/tsdoc-metadata.json | 22 +++--- .../src/components/Chats.svelte | 75 ++++++++----------- .../src/components/Main.svelte | 19 ++++- .../src/components/CreateApplication.svelte | 8 +- .../src/components/Chat.svelte | 56 +++++++------- 9 files changed, 129 insertions(+), 134 deletions(-) diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index 8434988ab7..d11d6363f9 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -425,8 +425,9 @@ } } -// THead background-color in Tooltip -.popup-tooltip .antiTable .scroller-thead { background-color: var(--accent-bg-color); } +// THead background-color in Tooltip and Popups +.popup-tooltip .antiTable .scroller-thead, +.popup .antiTable .scroller-thead { background-color: var(--accent-bg-color); } // Hide row menu in Tooltip .popup-tooltip .antiTable .antiTable-body__row:hover .antiTable-cells__firstCell .antiTable-cells__firstCell-menuRow { visibility: hidden; } diff --git a/plugins/activity-assets/src/tsdoc-metadata.json b/plugins/activity-assets/src/tsdoc-metadata.json index 83b5aaf730..1de76b30c9 100644 --- a/plugins/activity-assets/src/tsdoc-metadata.json +++ b/plugins/activity-assets/src/tsdoc-metadata.json @@ -1,11 +1,11 @@ -// This file is read by tools that parse documentation comments conforming to the TSDoc standard. -// It should be published with your NPM package. It should not be tracked by Git. -{ - "tsdocVersion": "0.12", - "toolPackages": [ - { - "packageName": "@microsoft/api-extractor", - "packageVersion": "7.23.0" - } - ] -} +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.23.0" + } + ] +} diff --git a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte index fc81719d6a..2260fc50b7 100644 --- a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte @@ -53,7 +53,8 @@ {#if removable}
{ + on:click|preventDefault={(ev) => { + ev.stopPropagation() dispatch('remove') }} > @@ -68,7 +69,8 @@ {#if removable}
{ + on:click={(ev) => { + ev.stopPropagation() dispatch('remove') }} > @@ -133,13 +135,14 @@ } .name { + white-space: nowrap; font-weight: 500; color: var(--theme-content-accent-color); - white-space: nowrap; cursor: pointer; } .type { + white-space: nowrap; font-size: 0.75rem; color: var(--theme-content-dark-color); } diff --git a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte index 8fde682bfe..9ee20e6b82 100644 --- a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte +++ b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte @@ -22,8 +22,6 @@ import { Account, Class, Doc, generateId, Ref, Space } from '@anticrm/core' import { Attachment } from '@anticrm/attachment' import AttachmentPresenter from './AttachmentPresenter.svelte' - import { IconClose } from '@anticrm/ui' - import { ActionIcon } from '@anticrm/ui' export let objectId: Ref export let space: Ref @@ -173,19 +171,16 @@ on:drop|preventDefault|stopPropagation={fileDrop} > {#if attachments.size} -
+
{#each Array.from(attachments.values()) as attachment}
- -
- { - removeAttachment(attachment) - }} - size="small" - /> -
+ { + if (result !== undefined) removeAttachment(attachment) + }} + />
{/each}
@@ -204,30 +199,18 @@ diff --git a/plugins/gmail-assets/src/tsdoc-metadata.json b/plugins/gmail-assets/src/tsdoc-metadata.json index 83b5aaf730..1de76b30c9 100644 --- a/plugins/gmail-assets/src/tsdoc-metadata.json +++ b/plugins/gmail-assets/src/tsdoc-metadata.json @@ -1,11 +1,11 @@ -// This file is read by tools that parse documentation comments conforming to the TSDoc standard. -// It should be published with your NPM package. It should not be tracked by Git. -{ - "tsdocVersion": "0.12", - "toolPackages": [ - { - "packageName": "@microsoft/api-extractor", - "packageVersion": "7.23.0" - } - ] -} +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.23.0" + } + ] +} diff --git a/plugins/gmail-resources/src/components/Chats.svelte b/plugins/gmail-resources/src/components/Chats.svelte index e14ea4e4fe..c8d96e994a 100644 --- a/plugins/gmail-resources/src/components/Chats.svelte +++ b/plugins/gmail-resources/src/components/Chats.svelte @@ -19,10 +19,9 @@ import gmail from '../plugin' import { Channel, Contact, EmployeeAccount, formatName } from '@anticrm/contact' import contact from '@anticrm/contact' - import plugin, { IconShare, Button, Tooltip, showPopup, Icon, Label, eventToHTMLElement, Scroller } from '@anticrm/ui' + import plugin, { IconShare, Button, Tooltip, Icon, Label, Scroller } from '@anticrm/ui' import { getCurrentAccount, Ref, SortingOrder, Space } from '@anticrm/core' import setting from '@anticrm/setting' - import Connect from './Connect.svelte' import Messages from './Messages.svelte' import { NotificationClientImpl } from '@anticrm/notification-resources' import IconInbox from './icons/Inbox.svelte' @@ -30,13 +29,13 @@ export let object: Contact export let channel: Channel export let newMessage: boolean + export let enabled: boolean const EMAIL_REGEX = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/ let messages: Message[] = [] let accounts: EmployeeAccount[] = [] - let enabled: boolean let selected: Set> = new Set>() let selectable = false @@ -122,50 +121,42 @@ } -
- {#if selectable} -
- {selected.size} -
-
-
-
-
+
+
-
- {:else if enabled} -
-
- {:else} -
-
- {/if} -
+ +
+ {/if} +
+{/if}
{#if messages && messages.length > 0} diff --git a/plugins/gmail-resources/src/components/Main.svelte b/plugins/gmail-resources/src/components/Main.svelte index a2f1b3eda9..dcb346efa4 100644 --- a/plugins/gmail-resources/src/components/Main.svelte +++ b/plugins/gmail-resources/src/components/Main.svelte @@ -22,9 +22,10 @@ import Chats from './Chats.svelte' import { createQuery, getClient } from '@anticrm/presentation' import { NotificationClientImpl } from '@anticrm/notification-resources' - import { Panel, Icon, Label } from '@anticrm/ui' + import { Panel, Icon, Label, Button, eventToHTMLElement, showPopup } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' import gmail from '../plugin' + import Connect from './Connect.svelte' export let _id: Ref export let _class: Ref> @@ -35,6 +36,7 @@ let currentMessage: SharedMessage | undefined = undefined let channel: Channel | undefined = undefined const notificationClient = NotificationClientImpl.getClient() + let enabled: boolean const client = getClient() const dispatch = createEventDispatcher() @@ -90,12 +92,25 @@
+ + + {#if !enabled} +