2026-05-24 19:51:29 +00:00
|
|
|
import type { Metadata, Viewport } from "next";
|
2026-05-26 23:17:56 +00:00
|
|
|
import "leaflet/dist/leaflet.css";
|
2026-05-24 19:51:29 +00:00
|
|
|
import "./globals.css";
|
|
|
|
|
import { AuthProvider } from "@/components/AuthProvider";
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
import OfflineIndicator from "@/components/OfflineIndicator";
|
|
|
|
|
import InstallPrompt from "@/components/InstallPrompt";
|
|
|
|
|
import { PWABridge } from "@/components/PWABridge";
|
2026-10-26 10:20:23 +00:00
|
|
|
import UpdateWatcher from "@/components/UpdateWatcher";
|
2026-07-07 18:43:17 +00:00
|
|
|
import LocationTracker from "@/components/LocationTracker";
|
2026-07-07 16:28:19 +00:00
|
|
|
import { applyDarkMode } from "@/lib/theme";
|
|
|
|
|
|
|
|
|
|
// Apply dark mode BEFORE React hydrates so we don't get a flash
|
|
|
|
|
// of light theme on first paint. Reads the same `1driver_settings`
|
|
|
|
|
// key the settings page writes to.
|
|
|
|
|
applyDarkMode();
|
2026-05-24 19:51:29 +00:00
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: "1Driver - Collections",
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
description: "Mobile driver collection management app",
|
2026-05-24 19:51:29 +00:00
|
|
|
manifest: "/manifest.json",
|
|
|
|
|
appleWebApp: {
|
|
|
|
|
capable: true,
|
|
|
|
|
statusBarStyle: "black-translucent",
|
|
|
|
|
title: "1Driver",
|
|
|
|
|
},
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
formatDetection: {
|
|
|
|
|
telephone: false,
|
|
|
|
|
},
|
2026-05-24 19:51:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const viewport: Viewport = {
|
|
|
|
|
width: "device-width",
|
|
|
|
|
initialScale: 1,
|
|
|
|
|
maximumScale: 1,
|
|
|
|
|
userScalable: false,
|
|
|
|
|
viewportFit: "cover",
|
refactor(ui): rebrand app, fix supplier naming
- rename `supplier` field to `suppliers` in OrderItem interface and PocketBase expand queries
- complete visual rebrand to warm cream (#f2f1ed) and dark brown (#26251e) color palette with custom CSS variables
- add accessibility improvements: skip-to-main content link, focus-visible styles, reduced motion support, and proper ARIA labels
- update all component styling to match new theme, including offline indicator, install prompt, login page, modals, map, bottom nav and global CSS
- standardize status colors: use green for success, red for errors, retain orange (#f54e00) as primary accent CTAs
2026-07-05 20:32:20 +00:00
|
|
|
themeColor: "#26251e",
|
2026-05-24 19:51:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function RootLayout({
|
|
|
|
|
children,
|
|
|
|
|
}: {
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}) {
|
|
|
|
|
return (
|
|
|
|
|
<html lang="en">
|
refactor(ui): rebrand app, fix supplier naming
- rename `supplier` field to `suppliers` in OrderItem interface and PocketBase expand queries
- complete visual rebrand to warm cream (#f2f1ed) and dark brown (#26251e) color palette with custom CSS variables
- add accessibility improvements: skip-to-main content link, focus-visible styles, reduced motion support, and proper ARIA labels
- update all component styling to match new theme, including offline indicator, install prompt, login page, modals, map, bottom nav and global CSS
- standardize status colors: use green for success, red for errors, retain orange (#f54e00) as primary accent CTAs
2026-07-05 20:32:20 +00:00
|
|
|
<body className="antialiased bg-[#f2f1ed] text-[#26251e] safe-top safe-bottom overscroll-none">
|
|
|
|
|
<a
|
|
|
|
|
href="#main-content"
|
|
|
|
|
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:bg-white focus:text-[#26251e] focus:rounded-lg focus:shadow-lg focus:font-semibold focus:text-sm"
|
|
|
|
|
>
|
|
|
|
|
Skip to main content
|
|
|
|
|
</a>
|
2026-05-24 19:51:29 +00:00
|
|
|
<AuthProvider>
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
<PWABridge />
|
2026-10-26 10:20:23 +00:00
|
|
|
<UpdateWatcher />
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
<OfflineIndicator />
|
|
|
|
|
<InstallPrompt />
|
2026-07-07 18:43:17 +00:00
|
|
|
{/*
|
|
|
|
|
LocationTracker hoisted to the layout so the GPS watch
|
|
|
|
|
survives bottom-nav tab switches. Previously this lived
|
|
|
|
|
on every page, which meant every tab switch tore down
|
|
|
|
|
watchPosition + the wake lock + the interval and then
|
|
|
|
|
re-acquired them. Now it lives once, gates on auth, and
|
|
|
|
|
persists across navigation.
|
|
|
|
|
*/}
|
|
|
|
|
<LocationTracker />
|
2026-05-24 19:51:29 +00:00
|
|
|
{children}
|
|
|
|
|
</AuthProvider>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
Add PWA support and UI redesign
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.
2026-05-26 22:34:50 +00:00
|
|
|
}
|