fix: improve rendering on narrow desktop screens

This commit is contained in:
dvdrw 2023-02-14 00:37:41 +01:00
parent 7d581afcaf
commit e0fe175566
Signed by: dvdrw
GPG Key ID: 044B8425E3CD03E0
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,9 @@
updateCredentials(undefined); updateCredentials(undefined);
} }
let mobile = primaryInput === 'touch'; let viewportWidth;
let mobile: boolean;
$: mobile = (primaryInput === 'touch' || viewportWidth <= 550);
let scrolledToTop = false, scrolledToBottom = false, let scrolledToTop = false, scrolledToBottom = false,
scrolledToLeft = false, scrolledToRight = false; scrolledToLeft = false, scrolledToRight = false;
@ -154,6 +156,7 @@
</script> </script>
<svelte:body use:updateTheme="{$theme}" /> <svelte:body use:updateTheme="{$theme}" />
<svelte:window bind:innerWidth={viewportWidth}/>
<div class="container hide-scrollbar snap-y h-100vh" <div class="container hide-scrollbar snap-y h-100vh"
class:mobile="{mobile}" class:mobile="{mobile}"