fix: restore admin content scrolling
This commit is contained in:
@@ -26,7 +26,6 @@
|
|||||||
import { onMount, setContext } from "svelte";
|
import { onMount, setContext } from "svelte";
|
||||||
import { fade } from "svelte/transition";
|
import { fade } from "svelte/transition";
|
||||||
import { Select } from "$components/ui/primitives.js";
|
import { Select } from "$components/ui/primitives.js";
|
||||||
import { ScrollArea } from "$components/ui/index.js";
|
|
||||||
import { AdminBadge, AdminButton } from "$components/patterns/admin/index.js";
|
import { AdminBadge, AdminButton } from "$components/patterns/admin/index.js";
|
||||||
|
|
||||||
import BrandMark from "$lib/webapp/BrandMark.svelte";
|
import BrandMark from "$lib/webapp/BrandMark.svelte";
|
||||||
@@ -761,90 +760,88 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="admin-main">
|
<main class="admin-main">
|
||||||
<ScrollArea class="admin-main-scroll" maxHeight="none">
|
{#key active}
|
||||||
{#key active}
|
<div class="admin-section-stage" in:fade={sectionFade} out:fade={sectionFade}>
|
||||||
<div class="admin-section-stage" in:fade={sectionFade} out:fade={sectionFade}>
|
{#if active === "stats"}
|
||||||
{#if active === "stats"}
|
<StatsSection {at} {fmtDate} {fmtDateShort} {fmtMoney} {paymentStatusVariant} />
|
||||||
<StatsSection {at} {fmtDate} {fmtDateShort} {fmtMoney} {paymentStatusVariant} />
|
{/if}
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if active === "users"}
|
{#if active === "users"}
|
||||||
<UsersSection
|
<UsersSection
|
||||||
{at}
|
{at}
|
||||||
{fmtDateShort}
|
{fmtDateShort}
|
||||||
{panelStatusBadge}
|
{panelStatusBadge}
|
||||||
{resolvedAvatarUrl}
|
{resolvedAvatarUrl}
|
||||||
{userDisplayName}
|
{userDisplayName}
|
||||||
{userInitials}
|
{userInitials}
|
||||||
{userSecondaryName}
|
{userSecondaryName}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "payments"}
|
{#if active === "payments"}
|
||||||
<PaymentsSection
|
<PaymentsSection
|
||||||
{at}
|
{at}
|
||||||
{fmtDate}
|
{fmtDate}
|
||||||
{fmtMoney}
|
{fmtMoney}
|
||||||
{paymentStatusVariant}
|
{paymentStatusVariant}
|
||||||
onOpenUserCard={openPaymentUserCard}
|
onOpenUserCard={openPaymentUserCard}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "promos"}
|
{#if active === "promos"}
|
||||||
<PromosSection {at} {fmtDateShort} />
|
<PromosSection {at} {fmtDateShort} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "ads"}
|
{#if active === "ads"}
|
||||||
<AdsSection {at} {fmtMoney} />
|
<AdsSection {at} {fmtMoney} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "broadcast"}
|
{#if active === "broadcast"}
|
||||||
<BroadcastSection {at} />
|
<BroadcastSection {at} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "logs"}
|
{#if active === "logs"}
|
||||||
<LogsSection {at} {fmtDate} />
|
<LogsSection {at} {fmtDate} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "support"}
|
{#if active === "support"}
|
||||||
<SupportSection
|
<SupportSection
|
||||||
{at}
|
{at}
|
||||||
{brand}
|
{brand}
|
||||||
{resolvedAvatarUrl}
|
{resolvedAvatarUrl}
|
||||||
onOpenUserCard={openUserCard}
|
onOpenUserCard={openUserCard}
|
||||||
initialTicketId={readSupportTicketIdFromPath()}
|
initialTicketId={readSupportTicketIdFromPath()}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "tariffs"}
|
{#if active === "tariffs"}
|
||||||
<TariffsSection {at} {fmtMoney} {onSettingsSaved} />
|
<TariffsSection {at} {fmtMoney} {onSettingsSaved} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "appearance"}
|
{#if active === "appearance"}
|
||||||
<AppearanceSection
|
<AppearanceSection
|
||||||
{at}
|
{at}
|
||||||
{currentLang}
|
{currentLang}
|
||||||
{onSettingsSaved}
|
{onSettingsSaved}
|
||||||
{brand}
|
{brand}
|
||||||
{appFaviconUrl}
|
{appFaviconUrl}
|
||||||
{appFaviconUseCustom}
|
{appFaviconUseCustom}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "settings"}
|
{#if active === "settings"}
|
||||||
<SettingsSection {at} {onSettingsSaved} {currentLang} />
|
<SettingsSection {at} {onSettingsSaved} {currentLang} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "backups"}
|
{#if active === "backups"}
|
||||||
<BackupsSection {at} {fmtDate} />
|
<BackupsSection {at} {fmtDate} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "translations"}
|
{#if active === "translations"}
|
||||||
<TranslationsSection {at} {onTranslationsSaved} />
|
<TranslationsSection {at} {onTranslationsSaved} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/key}
|
{/key}
|
||||||
</ScrollArea>
|
|
||||||
</main>
|
</main>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -348,7 +348,7 @@
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
overflow: hidden;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
padding: 24px 28px 36px;
|
padding: 24px 28px 36px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -359,14 +359,7 @@
|
|||||||
/* Flex children must NOT shrink — otherwise they collapse to fit the
|
/* Flex children must NOT shrink — otherwise they collapse to fit the
|
||||||
container and the main never overflows, breaking scroll. */
|
container and the main never overflows, breaking scroll. */
|
||||||
|
|
||||||
.admin-main-scroll {
|
.admin-main > * {
|
||||||
flex: 1 1 auto;
|
|
||||||
min-height: 0;
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admin-main > *,
|
|
||||||
.admin-main-scroll > .scroll-area__viewport > * {
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user