diff --git a/src/App.tsx b/src/App.tsx index 9b9a568..42ed1da 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,9 +5,17 @@ import { ThemeProvider } from "@/components/theme-provider"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom"; import { useEffect, useState } from "react"; +import { useIsMobile } from "@/hooks/use-mobile"; import Index from "./pages/Index"; import Login from "./pages/Login"; import NotFound from "./pages/NotFound"; +import MobileDashboard from "./pages/mobile/MobileDashboard"; +import CalendarPage from "./pages/mobile/CalendarPage"; +import NotesPage from "./pages/mobile/NotesPage"; +import NoteDetailPage from "./pages/mobile/NoteDetailPage"; +import TodosPage from "./pages/mobile/TodosPage"; +import RssPage from "./pages/mobile/RssPage"; +import SettingsPage from "./pages/mobile/SettingsPage"; import AuthService from "./services/AuthService"; import "./globals.css"; @@ -22,6 +30,22 @@ const ProtectedRoute = ({ children }: { children: React.ReactNode }) => { return <>{children}>; }; +// Auto-redirect component based on device +const AutoRedirect = () => { + const isMobile = useIsMobile(); + + if (isMobile === undefined) { + // Still detecting, show loading + return ( +
+ {isToday ? "Aujourd'hui" : startDate.toLocaleDateString('fr-FR', { day: '2-digit', month: '2-digit', timeZone: 'Europe/Paris' })} + {isAllDay ? ' - Toute la journée' : ` à ${startDate.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit', timeZone: 'Europe/Paris' })}`} +
+ {event.location && ( ++ 📍 {event.location} +
+ )} + {isSoon && ( +Aucun rendez-vous à venir
+ ++ {note.content ? note.content.replace(/<[^>]*>/g, '') : "Note vide"} +
+ + {/* Badges */} ++ {new Date(note.updated_at).toLocaleDateString('fr-FR', { + day: '2-digit', + month: '2-digit', + year: 'numeric' + })} +
+ )} ++ {searchQuery ? "Aucune note trouvée" : "Aucune note"} +
+ {!searchQuery && ( + + )} ++ {article.description.replace(/<[^>]*>/g, '')} +
+ )} + {article.pub_date && ( ++ {new Date(article.pub_date).toLocaleDateString('fr-FR', { + day: '2-digit', + month: '2-digit', + year: 'numeric' + })} +
+ )} +Aucun article
+ ++ Connecté en tant que: +
++ {calendarStatus.email} +
+ ++ Connectez votre compte Google pour synchroniser vos événements. +
+ ++ Configuration de l'intégration OpenRouter pour les fonctionnalités IA. +
+ +NoteFlow Mobile v1.0
+© 2024 NoteFlow
+Aucune tâche active
+ +Aucune tâche complétée
+