Fix narrow PWA layout on tablet with standalone width rules.

Allow any orientation in manifest, widen content and enable dual-column mode in installed apps on tablet viewports, with iOS display-mode fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 09:07:48 +08:00
parent 234ce18756
commit 98b83a5f75
8 changed files with 61 additions and 5 deletions
+6
View File
@@ -3,6 +3,7 @@ import type { Metadata, Viewport } from "next";
import React from "react";
import Umami from "@/components/umami";
import PwaProvider from "@/components/pwa/pwa-provider";
import PwaDisplayMode from "@/components/pwa/pwa-display-mode";
import { ThemeProvider } from "next-themes";
export const metadata: Metadata = {
@@ -14,6 +15,10 @@ export const metadata: Metadata = {
title: "知命阁",
statusBarStyle: "default",
},
other: {
"mobile-web-app-capable": "yes",
"apple-mobile-web-app-capable": "yes",
},
manifest: "/manifest.webmanifest",
};
@@ -49,6 +54,7 @@ export default function RootLayout({
disableTransitionOnChange
>
{children}
<PwaDisplayMode />
<PwaProvider />
</ThemeProvider>
<Umami />