UI/mobile keyboard and pwa popup fixes (#24610)
* ui: make mobile layout keyboard-aware via interactive-widget and dvh shell anchor * ui: fix duplicate PWA refresh popup by scoping the storage check to non-PWA pages
This commit is contained in:
@@ -9,7 +9,10 @@
|
|||||||
|
|
||||||
<link rel="manifest" href="./manifest.webmanifest" />
|
<link rel="manifest" href="./manifest.webmanifest" />
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1, interactive-widget=resizes-content"
|
||||||
|
/>
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
data-slot="sidebar-wrapper"
|
data-slot="sidebar-wrapper"
|
||||||
style="--sidebar-width: {sidebar.sidebarWidth}; --sidebar-min-width: {SIDEBAR_MIN_WIDTH}; --sidebar-max-width: {SIDEBAR_MAX_WIDTH}; --sidebar-width-icon: {SIDEBAR_WIDTH_ICON}; {style}"
|
style="--sidebar-width: {sidebar.sidebarWidth}; --sidebar-min-width: {SIDEBAR_MIN_WIDTH}; --sidebar-max-width: {SIDEBAR_MAX_WIDTH}; --sidebar-width-icon: {SIDEBAR_WIDTH_ICON}; {style}"
|
||||||
class={cn(
|
class={cn(
|
||||||
'group/sidebar-wrapper flex flex-col min-h-svh w-full has-data-[variant=inset]:bg-sidebar',
|
'group/sidebar-wrapper flex flex-col h-dvh w-full has-data-[variant=inset]:bg-sidebar',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
bind:this={ref}
|
bind:this={ref}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ export function usePwa() {
|
|||||||
// This comparison detects server upgrades for non-PWA users.
|
// This comparison detects server upgrades for non-PWA users.
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!browser) return;
|
if (!browser) return;
|
||||||
|
// PWA pages update via the service worker path; the storage check is the non-PWA fallback only
|
||||||
|
if (navigator.serviceWorker?.controller) return;
|
||||||
|
|
||||||
const currentVersion = versionStore.value;
|
const currentVersion = versionStore.value;
|
||||||
if (!currentVersion) return;
|
if (!currentVersion) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user