- Created useOfflineSync hook for connectivity detection and sync management - Implemented localStorage-based mutation queue for offline operations - Added background sync support in service worker - Created OfflineIndicator component to show connection status - Added offline-aware action wrappers for seamless offline/online transitions - Implemented conflict handling with retry logic (up to 3 retries) - Auto-sync when connection is restored - Validates Requirements 4.5
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import './globals.css'
|
|
import ServiceWorkerRegistration from '@/components/ServiceWorkerRegistration'
|
|
import OfflineIndicator from '@/components/OfflineIndicator'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Ultimate Lists',
|
|
description: 'The ultimate todo list app with advanced task management',
|
|
manifest: '/manifest.json',
|
|
themeColor: '#3B82F6',
|
|
viewport: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no',
|
|
appleWebApp: {
|
|
capable: true,
|
|
statusBarStyle: 'default',
|
|
title: 'Ultimate Lists',
|
|
},
|
|
applicationName: 'Ultimate Lists',
|
|
icons: {
|
|
icon: '/icon-192.svg',
|
|
apple: '/icon-192.svg',
|
|
},
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="apple-touch-icon" href="/icon-192.svg" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<meta name="apple-mobile-web-app-title" content="Ultimate Lists" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
</head>
|
|
<body className="bg-gray-50 min-h-screen">
|
|
<ServiceWorkerRegistration />
|
|
<OfflineIndicator />
|
|
{children}
|
|
</body>
|
|
</html>
|
|
)
|
|
} |