Add full PWA support (icons, manifest, service worker, pwa lib and bridge) and introduce install/offline UI. Generate app icons via a new scripts/generate-icons.js and include multiple icon sizes in public/icons; update manifest and layout head meta/preconnect. Revamp global styles (globals.css) with new utilities, animations, spacing for bottom nav, card shadows, skeletons and accessibility tweaks. Polish major screens (login, collections, map, settings) with improved headers, loading states, touch/press feedback, and layout adjustments; add new components (InstallPrompt, OfflineIndicator, PWABridge) and update various components to match new visual/UX patterns. Update Dockerfile to generate icons and use Next.js static export output (/out) for nginx, and bump package setup to support icon generation.
60 lines
No EOL
1.9 KiB
TypeScript
60 lines
No EOL
1.9 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import "./globals.css";
|
|
import { AuthProvider } from "@/components/AuthProvider";
|
|
import OfflineIndicator from "@/components/OfflineIndicator";
|
|
import InstallPrompt from "@/components/InstallPrompt";
|
|
import { PWABridge } from "@/components/PWABridge";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "1Driver - Collections",
|
|
description: "Mobile driver collection management app",
|
|
manifest: "/manifest.json",
|
|
appleWebApp: {
|
|
capable: true,
|
|
statusBarStyle: "black-translucent",
|
|
title: "1Driver",
|
|
},
|
|
formatDetection: {
|
|
telephone: false,
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
userScalable: false,
|
|
viewportFit: "cover",
|
|
themeColor: "#ea580c",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/icons/icon-152.png" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="theme-color" content="#ea580c" />
|
|
<meta name="background-color" content="#f97316" />
|
|
<link rel="preconnect" href="https://cdnjs.cloudflare.com" />
|
|
<link rel="preconnect" href="https://tile.openstreetmap.org" />
|
|
</head>
|
|
<body className="antialiased bg-gray-50 safe-top safe-bottom overscroll-none">
|
|
<AuthProvider>
|
|
<PWABridge />
|
|
<OfflineIndicator />
|
|
<InstallPrompt />
|
|
{children}
|
|
</AuthProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
} |