mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 08:21:08 +00:00
UI fixes (#7192)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
This commit is contained in:
parent
641e72fc0d
commit
5e10da812d
@ -450,3 +450,6 @@
|
|||||||
.select-text p > br.ProseMirror-trailingBreak::selection {
|
.select-text p > br.ProseMirror-trailingBreak::selection {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
.select-text .text-editor-image-container {
|
||||||
|
user-select: all;
|
||||||
|
}
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
export let disablePointerEventsOnScroll = false
|
export let disablePointerEventsOnScroll = false
|
||||||
export let onScroll: ((params: ScrollParams) => void) | undefined = undefined
|
export let onScroll: ((params: ScrollParams) => void) | undefined = undefined
|
||||||
export let onResize: (() => void) | undefined = undefined
|
export let onResize: (() => void) | undefined = undefined
|
||||||
|
export let containerName: string | undefined = undefined
|
||||||
|
export let containerType: 'size' | 'inline-size' | undefined = containerName !== undefined ? 'inline-size' : undefined
|
||||||
|
|
||||||
export function scroll (top: number, left?: number, behavior: 'auto' | 'smooth' = 'auto') {
|
export function scroll (top: number, left?: number, behavior: 'auto' | 'smooth' = 'auto') {
|
||||||
if (divScroll) {
|
if (divScroll) {
|
||||||
@ -598,6 +600,8 @@
|
|||||||
: 'row'}
|
: 'row'}
|
||||||
style:height={contentDirection === 'vertical-reverse' ? 'max-content' : noStretch ? 'auto' : '100%'}
|
style:height={contentDirection === 'vertical-reverse' ? 'max-content' : noStretch ? 'auto' : '100%'}
|
||||||
style:align-items={align}
|
style:align-items={align}
|
||||||
|
style:container-name={containerName}
|
||||||
|
style:container-type={containerType}
|
||||||
class:disableEvents={isScrolling && disablePointerEventsOnScroll}
|
class:disableEvents={isScrolling && disablePointerEventsOnScroll}
|
||||||
use:resizeObserver={() => {
|
use:resizeObserver={() => {
|
||||||
checkAutoScroll()
|
checkAutoScroll()
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Class, Doc, Ref, Space } from '@hcengineering/core'
|
import type { Class, Doc, Ref, Space } from '@hcengineering/core'
|
||||||
import { Label, Section } from '@hcengineering/ui'
|
import { Label, Section, Scroller } from '@hcengineering/ui'
|
||||||
import { Table, ViewletsSettingButton } from '@hcengineering/view-resources'
|
import { Table, ViewletsSettingButton } from '@hcengineering/view-resources'
|
||||||
import { Viewlet, ViewletPreference } from '@hcengineering/view'
|
import { Viewlet, ViewletPreference } from '@hcengineering/view'
|
||||||
|
|
||||||
@ -46,14 +46,16 @@
|
|||||||
|
|
||||||
<svelte:fragment slot="content">
|
<svelte:fragment slot="content">
|
||||||
{#if meetings > 0 && viewlet}
|
{#if meetings > 0 && viewlet}
|
||||||
<Table
|
<Scroller horizontal>
|
||||||
_class={love.class.MeetingMinutes}
|
<Table
|
||||||
config={preference?.config ?? viewlet.config}
|
_class={love.class.MeetingMinutes}
|
||||||
query={{ attachedTo: objectId }}
|
config={preference?.config ?? viewlet.config}
|
||||||
loadingProps={{ length: meetings }}
|
query={{ attachedTo: objectId }}
|
||||||
prefferedSorting="createdOn"
|
loadingProps={{ length: meetings }}
|
||||||
{readonly}
|
prefferedSorting="createdOn"
|
||||||
/>
|
{readonly}
|
||||||
|
/>
|
||||||
|
</Scroller>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="antiSection-empty solid flex-col mt-3">
|
<div class="antiSection-empty solid flex-col mt-3">
|
||||||
<span class="content-dark-color">
|
<span class="content-dark-color">
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
participants = participants
|
participants = participants
|
||||||
participantElements.length = participants.length
|
participantElements.length = participants.length
|
||||||
await tick()
|
await tick()
|
||||||
participantElements[index].appendChild(element)
|
participantElements[index]?.appendChild(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
function attachParticipant (participant: Participant): void {
|
function attachParticipant (participant: Participant): void {
|
||||||
@ -362,12 +362,21 @@
|
|||||||
<div class="screenContainer" class:hidden={!$screenSharing || $isSharingEnabled}>
|
<div class="screenContainer" class:hidden={!$screenSharing || $isSharingEnabled}>
|
||||||
<video class="screen" bind:this={screen}></video>
|
<video class="screen" bind:this={screen}></video>
|
||||||
</div>
|
</div>
|
||||||
<Scroller bind:divScroll noStretch padding={'0 .5rem'} gap={'flex-gap-2'} onResize={dispatchFit} stickedScrollBars>
|
<Scroller
|
||||||
{#each activeParticipants as participant, i (participant._id)}
|
bind:divScroll
|
||||||
<div class="video">
|
noStretch
|
||||||
<ParticipantView bind:this={participantElements[i]} {...participant} small />
|
padding={'0 .5rem'}
|
||||||
</div>
|
containerName={'videoPopupСontainer'}
|
||||||
{/each}
|
onResize={dispatchFit}
|
||||||
|
stickedScrollBars
|
||||||
|
>
|
||||||
|
<div class="videoGrid">
|
||||||
|
{#each activeParticipants as participant, i (participant._id)}
|
||||||
|
<div class="video">
|
||||||
|
<ParticipantView bind:this={participantElements[i]} {...participant} small />
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
</Scroller>
|
</Scroller>
|
||||||
<div class="antiNav-space" />
|
<div class="antiNav-space" />
|
||||||
</div>
|
</div>
|
||||||
@ -390,7 +399,6 @@
|
|||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -412,6 +420,9 @@
|
|||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
|
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.screen {
|
.screen {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -419,7 +430,21 @@
|
|||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hidden {
|
|
||||||
display: none;
|
.videoGrid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-auto-flow: row;
|
||||||
|
gap: var(--spacing-1);
|
||||||
|
}
|
||||||
|
@container videoPopupСontainer (max-width: 60rem) {
|
||||||
|
.videoGrid {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@container videoPopupСontainer (max-width: 30rem) {
|
||||||
|
.videoGrid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -38,13 +38,14 @@
|
|||||||
|
|
||||||
$: src = convertedFile === undefined ? '' : getFileUrl(convertedFile as Ref<Blob>, name)
|
$: src = convertedFile === undefined ? '' : getFileUrl(convertedFile as Ref<Blob>, name)
|
||||||
|
|
||||||
const colors = $themeStore.dark
|
$: colors = $themeStore.dark
|
||||||
? `
|
? `
|
||||||
--theme-text-primary-color: rgba(255, 255, 255, .8);
|
--theme-text-primary-color: rgba(255, 255, 255, .8);
|
||||||
--theme-link-color: #377AE6;
|
--theme-link-color: #377AE6;
|
||||||
--button-border-hover: #45484e;
|
--button-border-hover: #45484e;
|
||||||
--text-editor-table-header-color: rgba(255, 255, 255, 0.06);
|
--text-editor-table-header-color: rgba(255, 255, 255, 0.06);
|
||||||
--scrollbar-bar-color: #35354a;
|
--scrollbar-bar-color: #35354a;
|
||||||
|
--scrollbar-bar-hover: #8a8aa5;
|
||||||
`
|
`
|
||||||
: `
|
: `
|
||||||
--theme-text-primary-color: rgba(0, 0, 0, .8);
|
--theme-text-primary-color: rgba(0, 0, 0, .8);
|
||||||
@ -52,7 +53,9 @@
|
|||||||
--button-border-hover: #c9cbcd;
|
--button-border-hover: #c9cbcd;
|
||||||
--text-editor-table-header-color: rgba(0, 0, 0, 0.06);
|
--text-editor-table-header-color: rgba(0, 0, 0, 0.06);
|
||||||
--scrollbar-bar-color: #e0e0e0;
|
--scrollbar-bar-color: #e0e0e0;
|
||||||
|
--scrollbar-bar-hover: #90959d;
|
||||||
`
|
`
|
||||||
|
let oldColors = colors
|
||||||
|
|
||||||
$: css = `
|
$: css = `
|
||||||
* {
|
* {
|
||||||
@ -68,10 +71,9 @@
|
|||||||
--timing-main: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
--timing-main: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
--timing-rotate: cubic-bezier(.28,1.92,.39,.56);
|
--timing-rotate: cubic-bezier(.28,1.92,.39,.56);
|
||||||
--timing-clock: cubic-bezier(.35,2.1,.79,.71);
|
--timing-clock: cubic-bezier(.35,2.1,.79,.71);
|
||||||
|
|
||||||
&::after,
|
|
||||||
&::before { box-sizing: border-box; }
|
|
||||||
}
|
}
|
||||||
|
*::after,
|
||||||
|
*::before { box-sizing: border-box; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
${colors}
|
${colors}
|
||||||
@ -88,6 +90,10 @@
|
|||||||
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
|
|
||||||
|
@media not print {
|
||||||
|
padding: .75rem 1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 600px) {
|
@media only screen and (max-width: 600px) {
|
||||||
@ -237,20 +243,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar { width: 6px; }
|
||||||
|
::-webkit-scrollbar:horizontal { height: 6px; }
|
||||||
|
::-webkit-scrollbar-track { margin: 6px; }
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
background-color: var(--scrollbar-bar-color);
|
background-color: var(--scrollbar-bar-color);
|
||||||
|
border-radius: .25rem;
|
||||||
}
|
}
|
||||||
|
::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-bar-hover); }
|
||||||
&::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-corner {
|
||||||
background-color: var(--scrollbar-bar-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-corner {
|
|
||||||
background-color: var(--scrollbar-bar-color);
|
background-color: var(--scrollbar-bar-color);
|
||||||
}
|
border-radius: .25rem;
|
||||||
|
|
||||||
&::-webkit-scrollbar-track {
|
|
||||||
margin: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmark {
|
cmark {
|
||||||
@ -261,6 +264,15 @@
|
|||||||
`
|
`
|
||||||
|
|
||||||
let frame: HTMLIFrameElement | undefined = undefined
|
let frame: HTMLIFrameElement | undefined = undefined
|
||||||
|
const applyStyles = (): void => {
|
||||||
|
const head = frame?.contentDocument?.querySelector('head')
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||||
|
if (css !== undefined && head !== undefined && head !== null) {
|
||||||
|
head.appendChild(document.createElement('style')).textContent = css
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||||
$: if (css !== undefined && frame !== undefined && frame !== null) {
|
$: if (css !== undefined && frame !== undefined && frame !== null) {
|
||||||
frame.onload = () => {
|
frame.onload = () => {
|
||||||
@ -269,9 +281,18 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||||
if (css !== undefined && head !== undefined && head !== null) {
|
if (css !== undefined && head !== undefined && head !== null) {
|
||||||
head.appendChild(document.createElement('style')).textContent = css
|
head.appendChild(document.createElement('style')).textContent = css
|
||||||
|
oldColors = colors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$: if (oldColors !== colors && css !== undefined && frame != null) {
|
||||||
|
const style = frame?.contentDocument?.querySelector('head style')
|
||||||
|
|
||||||
|
if (style != null) {
|
||||||
|
style.textContent = css
|
||||||
|
oldColors = colors
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if src}
|
{#if src}
|
||||||
|
Loading…
Reference in New Issue
Block a user