diff --git a/packages/presentation/src/components/EditAvatarPopup.svelte b/packages/presentation/src/components/EditAvatarPopup.svelte index bdbe75c601..6ac76c35c5 100644 --- a/packages/presentation/src/components/EditAvatarPopup.svelte +++ b/packages/presentation/src/components/EditAvatarPopup.svelte @@ -91,7 +91,7 @@ } .root { - position: fixed; + position: absolute; top: 0; bottom: 0; left: 0; diff --git a/packages/presentation/src/components/EditableAvatar.svelte b/packages/presentation/src/components/EditableAvatar.svelte index c608b1c763..0463b21e87 100644 --- a/packages/presentation/src/components/EditableAvatar.svelte +++ b/packages/presentation/src/components/EditableAvatar.svelte @@ -38,7 +38,7 @@ } else { return inputRef.click() } - showPopup(EditAvatarPopup, { file }, undefined, (blob) => { + showPopup(EditAvatarPopup, { file }, 'full', (blob) => { if (blob === undefined) { return } diff --git a/packages/theme/src/Theme.svelte b/packages/theme/src/Theme.svelte index 528ab1948e..c36126e869 100644 --- a/packages/theme/src/Theme.svelte +++ b/packages/theme/src/Theme.svelte @@ -53,11 +53,16 @@ } }) + const setDocumentLanguage = (): void => { + document.documentElement.lang = currentLanguage + } + onMount(() => { setRootColors(currentTheme) setRootFontSize(currentFontSize) setMetadata(platform.metadata.locale, currentLanguage) loadPluginStrings(currentLanguage) + setDocumentLanguage() }) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 5bab0d4371..b9e9fa0546 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -94,6 +94,9 @@ p:first-child { margin-block-start: 0; } // First and last padding p:last-child { margin-block-end: 0; } .p-inline { + overflow-wrap: break-word; + word-wrap: break-word; + hyphens: auto; line-height: 150%; a { word-break: break-all; diff --git a/packages/ui/src/components/PanelInstance.svelte b/packages/ui/src/components/PanelInstance.svelte index 7284a346c7..314c77aa66 100644 --- a/packages/ui/src/components/PanelInstance.svelte +++ b/packages/ui/src/components/PanelInstance.svelte @@ -80,7 +80,7 @@ if ((fullSize || docSize) && (props.element === 'float' || props.element === 'content')) { options = fitPopupElement(modalHTML, 'full') options.props.width = '100vw' - options.props.maxHeight = 'max-content' + options.props.maxHeight = '100vh' options.showOverlay = false modalHTML.classList.add('fullsize') } else { @@ -142,6 +142,7 @@ style:max-width={options.props.maxWidth} style:max-height={options.props.maxHeight} style:min-width={options.props.minWidth} + style:transform={options.props.transform} >
{ - if (divBox) { - const el = divBox.querySelector('.scroller-back') - if (el && divScroll) { - const rectScroll = divScroll.getBoundingClientRect() - const rectEl = el.getBoundingClientRect() - const bottom = document.body.clientHeight - rectScroll.bottom - let top = rectEl.top - if (top < rectScroll.top) top = rectScroll.top - if (top > rectScroll.bottom) top = rectScroll.top + rectScroll.height - divBack.style.left = rectScroll.left + 'px' - divBack.style.right = document.body.clientWidth - rectScroll.right + 'px' - divBack.style.top = top + 'px' - divBack.style.bottom = bottom + 'px' - divBack.style.height = 'auto' - divBack.style.width = 'auto' - divBack.style.visibility = 'visible' - isBack = true - } else { - divBack.style.visibility = 'hidden' - isBack = false - } - } - } - const checkBar = (): void => { if (divBar && divScroll) { const proc = (divScroll.clientHeight / divScroll.scrollHeight) * 100 @@ -120,19 +93,20 @@ else if (belowContent > 1) mask = 'top' else mask = 'none' - if (scrolling && divScroll.scrollHeight - divScroll.clientHeight - divScroll.scrollTop > 10 && !firstScroll) { - scrolling = false + if (autoscroll) { + if (scrolling && divScroll.scrollHeight - divScroll.clientHeight - divScroll.scrollTop > 10 && !firstScroll) { + scrolling = false + } + if (!scrolling && belowContent && belowContent <= 10) scrolling = true } - if (!scrolling && belowContent && belowContent <= 10) scrolling = true } - checkBack() if (!isScrolling) checkBar() } const observer = new IntersectionObserver(() => checkFade(), { root: null, threshold: 0.1 }) const scrollDown = (): void => { - divScroll.scrollTop = divScroll.scrollHeight + divScroll.scrollTop = divScroll.scrollHeight - divHeight } $: if (scrolling && belowContent && belowContent > 10) scrollDown() onMount(() => { @@ -140,13 +114,12 @@ divScroll.addEventListener('scroll', checkFade) const tempEl = divBox.querySelector('*') as HTMLElement if (tempEl) observer.observe(tempEl) - if (scrolling) { + if (autoscroll && scrolling) { scrollDown() firstScroll = false } checkFade() } - if (divBack) checkBack() }) onDestroy(() => { if (divScroll) divScroll.removeEventListener('scroll', checkFade) @@ -155,21 +128,20 @@ if (divScroll && divBox) { const tempEl = divBox.querySelector('*') as HTMLElement if (tempEl) observer.observe(tempEl) - if (scrolling) scrollDown() + if (autoscroll && scrolling) scrollDown() checkFade() } }) - let divWidth: number = 0 + let divHeight: number const _resize = (): void => checkFade() - $: if (divWidth) _resize()
-
@@ -192,6 +163,7 @@ display: flex; flex-direction: column; height: 100%; + min-width: 0; min-height: 0; } .scroll { @@ -208,7 +180,6 @@ .box { display: flex; flex-direction: column; - height: 100%; } .scroller-container.bottomStart { justify-content: flex-end; @@ -269,14 +240,4 @@ transition: none; } } - - .back { - visibility: hidden; - position: fixed; - width: 0; - height: 0; - // background-color: red; - background-color: var(--body-color); - z-index: -1; - } diff --git a/packages/ui/src/components/ShowMore.svelte b/packages/ui/src/components/ShowMore.svelte index 19ec168e9f..33c652e3e8 100644 --- a/packages/ui/src/components/ShowMore.svelte +++ b/packages/ui/src/components/ShowMore.svelte @@ -33,7 +33,7 @@ $: if (bigger && !ignore) crop = true -
+
diff --git a/plugins/activity-resources/src/components/TxView.svelte b/plugins/activity-resources/src/components/TxView.svelte index 85d47ecfdb..46e74a6d4e 100644 --- a/plugins/activity-resources/src/components/TxView.svelte +++ b/plugins/activity-resources/src/components/TxView.svelte @@ -19,7 +19,18 @@ import core, { AnyAttribute, Doc, getCurrentAccount, Ref } from '@anticrm/core' import { Asset, getResource } from '@anticrm/platform' import { getClient } from '@anticrm/presentation' - import { Component, Icon, IconEdit, IconMoreH, Label, Menu, ShowMore, showPopup, TimeSince } from '@anticrm/ui' + import { + Component, + Icon, + IconEdit, + IconMoreH, + Label, + Menu, + ShowMore, + showPopup, + TimeSince, + Button + } from '@anticrm/ui' import type { AttributeModel } from '@anticrm/view' import { getActions } from '@anticrm/view-resources' import { ActivityKey, DisplayTx } from '../activity' @@ -122,7 +133,7 @@
{/if} -
+
@@ -133,7 +144,7 @@ {/if}
{#if viewlet && viewlet?.editable} -
+
{#if viewlet.label}
{:else if viewlet && viewlet.label} @@ -188,11 +203,11 @@
{:else} - {#if hasMessageType}
{/if} @@ -236,7 +251,7 @@ {:else if viewlet && viewlet.display === 'inline' && viewlet.component} {#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1} -
+
@@ -256,7 +271,7 @@
{#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1} -
+
{:else if typeof viewlet.component === 'string'} @@ -274,6 +289,7 @@