L7 Offline & PWA: Sync-Seite, Offline-Ansicht, Sync-Badge, Installationshinweis, Logout-Schutz
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { requireModule } from "@/server/modules";
|
||||
|
||||
/** Modul-Gate „field" für die Offline-Ansicht (Lane L7). */
|
||||
export default async function ModuleLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
||||
await requireModule("field");
|
||||
return <>{children}</>;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { OfflineView } from "@/components/offline/offline-view";
|
||||
|
||||
/**
|
||||
* `/m/offline` — offline fallback (lane L7): order list/detail from the local bundle. Cached by the
|
||||
* service worker; the content is rendered on the client from IndexedDB, so the cached HTML stays
|
||||
* valid while offline.
|
||||
*/
|
||||
export default async function OfflinePage() {
|
||||
const t = await getTranslations("offline.view");
|
||||
return (
|
||||
<main className="space-y-4 p-4">
|
||||
<h1 className="text-[26px]">{t("title")}</h1>
|
||||
<OfflineView />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user