Fix Jumping popup (#2545)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-01-25 19:46:32 +03:00 committed by GitHub
parent 0a5a753299
commit 0cd868ce4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 13 deletions

View File

@ -420,12 +420,13 @@
display: flex;
flex-direction: column;
padding: .5rem;
min-width: 22rem;
min-height: 22rem;
background: var(--popup-bg-color);
border-radius: .5rem;
box-shadow: var(--popup-shadow);
&:not(.min-w-168) { min-width: 22rem; }
.header {
display: flex;
align-items: center;

View File

@ -54,7 +54,6 @@
function _update (result: any): void {
if (onUpdate !== undefined) onUpdate(result)
fitPopup()
}
function _close (result: any): void {

View File

@ -140,9 +140,7 @@
/>
</div>
{/if}
{#if cHeight === 1}
<div class="background-theme-content-accent" style:height={'2px'} />
{/if}
<div class:background-accent-bg-color={cHeight === 1} style:height={'2px'} />
<div class="scroll" on:scroll={() => updateLocation(scrollDiv, selectedDiv, filteredObjects)} bind:this={scrollDiv}>
<div class="box">
<ListView
@ -204,7 +202,5 @@
</ListView>
</div>
</div>
{#if cHeight === -1}
<div class="background-theme-content-accent" style:height={'2px'} />
{/if}
<div class:background-accent-bg-color={cHeight === -1} style:height={'2px'} />
</div>

View File

@ -29,9 +29,10 @@
}
const currentUser = getCurrentAccount() as EmployeeAccount
$: isMobile = $deviceInfo.isMobile
</script>
<div class="notifyPopup" class:min-w-168={!$deviceInfo.isMobile}>
<div class="notifyPopup" class:min-w-168={!isMobile}>
<div class="header flex-between">
<span class="fs-title overflow-label"><Label label={calendar.string.Reminders} /></span>
<Button icon={IconAdd} size={'medium'} kind={'transparent'} on:click={(e) => click(e)} />

View File

@ -27,9 +27,10 @@
$: query.query(calendar.mixin.Reminder, { state: 'active', participants: currentUser.employee }, (res) => {
remindersCount = res.length
})
$: isMobile = $deviceInfo.isMobile
</script>
<div class="notifyPopup" class:justify-center={!remindersCount} class:min-w-168={!$deviceInfo.isMobile}>
<div class="notifyPopup" class:justify-center={!remindersCount} class:min-w-168={!isMobile}>
<div class="header">
<span class="fs-title overflow-label"><Label label={calendar.string.Reminders} /></span>
</div>

View File

@ -75,9 +75,10 @@
}
}
}
$: isMobile = $deviceInfo.isMobile
</script>
<div class="notifyPopup" class:justify-center={notifications.length === 0} class:min-w-168={!$deviceInfo.isMobile}>
<div class="notifyPopup" class:justify-center={notifications.length === 0} class:min-w-168={!isMobile}>
<div class="header flex-between">
<span class="fs-title overflow-label"><Label label={notification.string.Notifications} /></span>
{#if notifications.length > 0}

View File

@ -35,9 +35,10 @@
(p) => p.requested.filter((a) => a === me).length > p.approved.filter((a) => a === me).length
))
)
$: isMobile = $deviceInfo.isMobile
</script>
<div class="notifyPopup" class:justify-center={requests.length === 0} class:min-w-168={!$deviceInfo.isMobile}>
<div class="notifyPopup" class:justify-center={requests.length === 0} class:min-w-168={!isMobile}>
<div class="header flex-between">
<span class="fs-title overflow-label"><Label label={request.string.Requests} /></span>
</div>