fix margin-right on mobile

This commit is contained in:
Min Idzelis
2025-04-13 15:18:35 +00:00
parent 6a0008354f
commit c294448748
2 changed files with 8 additions and 3 deletions

View File

@@ -85,6 +85,7 @@
let leadout = $state(false);
const maxMd = $derived(mobileDevice.maxMd);
const usingMobileDevice = $derived(mobileDevice.pointerCoarse);
$effect(() => {
assetStore.rowHeight = maxMd ? 100 : 235;
@@ -743,10 +744,10 @@
<section
id="asset-grid"
class={['scrollbar-hidden h-full overflow-y-auto outline-none', { 'm-0': isEmpty }, { 'ml-0': !isEmpty }]}
style:margin-right={scrubberWidth + 'px'}
style:margin-right={(usingMobileDevice ? 0 : scrubberWidth) + 'px'}
tabindex="-1"
bind:clientHeight={assetStore.viewportHeight}
bind:clientWidth={null, (v) => ((assetStore.viewportWidth = v - scrubberWidth), updateSlidingWindow())}
bind:clientWidth={null, (v) => ((assetStore.viewportWidth = v), updateSlidingWindow())}
bind:this={element}
onscroll={() => (handleTimelineScroll(), updateSlidingWindow(), updateIsScrolling())}
>

View File

@@ -13,7 +13,11 @@
>
{title}
</div>
<div class="animate-pulse absolute h-full ml-[10px]" style:width="calc(100% - 10px)" data-skeleton="true"></div>
<div
class="animate-pulse absolute h-full ml-[10px] mr-[10px]"
style:width="calc(100% - 20px)"
data-skeleton="true"
></div>
</div>
<style>