fuck that shit, revert
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m3s

This commit is contained in:
bytedream 2024-12-28 03:46:17 +01:00
parent 8ea1750f1a
commit fde50d21a6
5 changed files with 159 additions and 176 deletions

View File

@ -6,21 +6,6 @@
let bodyElem: HTMLTableSectionElement;
let intersectionElem: HTMLElement;
async function onUpdateProxy() {
let scrollElem: HTMLElement | null = bodyElem;
while (scrollElem && scrollElem.scrollHeight <= scrollElem.clientHeight) {
scrollElem = scrollElem.parentElement;
}
const scrollTop = scrollElem?.scrollTop ?? 0;
await onUpdate();
if (scrollElem) scrollElem.scrollTop = scrollTop;
await tick();
}
async function getIntersectionElement(): Promise<HTMLElement> {
if (!bodyElem.lastElementChild) {
await new Promise<void>((resolve) => {
@ -36,7 +21,8 @@
}
onMount(async () => {
await onUpdateProxy();
await onUpdate();
await tick();
if (!bodyElem) return;
@ -47,7 +33,8 @@
const rows = bodyElem.rows.length;
await onUpdateProxy();
await onUpdate();
await tick();
if (rows === bodyElem.rows.length) return;
observer.observe((intersectionElem = await getIntersectionElement()));

View File

@ -133,7 +133,7 @@
<div class="grid">
{#key $page.url.pathname}
<div
class="col-[1] row-[1] h-[calc(100vh-3rem)] w-full overflow-y-scroll overflow-x-hidden"
class="col-[1] row-[1] h-full w-full overflow-y-scroll overflow-x-hidden"
in:fly={{ x: transitionPrefix * window.innerWidth, duration: !transitionPrefix ? 0 : 100 }}
out:fly={{
x: transitionPrefix * -window.innerWidth,
@ -145,7 +145,7 @@
{/key}
</div>
{:else}
<div class="h-[calc(100vh-3rem)] w-full">
<div class="h-full w-full">
{@render children()}
</div>
{/if}

View File

@ -66,7 +66,6 @@
onUpdate={() => fetchFeedback({ from: 0 }).then((r) => (feedbacks = r))}
/>
<hr class="divider my-1 mx-8 border-none" />
<div class="h-full overflow-scroll">
<table class="table table-fixed h-fit">
<thead>
<tr>
@ -127,7 +126,6 @@
</PaginationTableBody>
</table>
</div>
</div>
{#if activeFeedback}
<div
class="relative flex flex-col w-2/5 h-[calc(100vh-3rem)] bg-base-200/50 px-4 py-6 overflow-scroll"

View File

@ -115,7 +115,6 @@
</div>
</div>
<hr class="divider my-1 mx-8 border-none" />
<div class="h-full overflow-scroll">
<table class="table table-fixed h-fit">
<colgroup>
<col style="width: 20%" />
@ -206,7 +205,6 @@
</PaginationTableBody>
</table>
</div>
</div>
{#if activeReport}
<div
class="relative flex flex-col w-2/5 h-[calc(100vh-3rem)] bg-base-200/50 px-4 py-6 overflow-scroll"

View File

@ -96,7 +96,7 @@
<table class="table table-auto">
<thead>
<!-- prettier-ignore -->
<SortableTr>
<SortableTr class="[&>th]:bg-base-100 [&>th]:z-[1] [&>th]:sticky [&>th]:top-0">
<th></th>
<SortableTh onSort={(e) => userFilter = {...userFilter, sort: {key: 'firstname', asc: e.asc}}}>Vorname</SortableTh>
<SortableTh onSort={(e) => userFilter = {...userFilter, sort: {key: 'lastname', asc: e.asc}}}>Nachname</SortableTh>