mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-23 07:08:17 +02:00
feat: add dark/light/system theme toggle
Implemented complete theme switching with three modes: - Light theme - Dark theme - System (auto-detect from OS) Changes: - Created ModeToggle component with dropdown menu (src/components/mode-toggle.tsx) - Added theme toggle to desktop header (Index.tsx) - Enhanced mobile settings with radio group for theme selection (SettingsPage.tsx) - Changed default theme from "light" to "system" for better UX (App.tsx) Features: ✅ Seamless theme switching without page reload ✅ Persists user preference in localStorage ✅ System theme auto-detects OS preference ✅ Smooth transitions between themes ✅ Works on both mobile and desktop Desktop: Theme toggle button in top navigation Mobile: Theme settings in Settings page with Light/Dark/System options
This commit is contained in:
4 files changed
+64
-15
No files matched your search
@@ -32,6 +32,7 @@ import { ConfirmModal } from "@/components/modals/ConfirmModal";
|
||||
import { InputModal } from "@/components/modals/InputModal";
|
||||
import { AddUserModal } from "@/components/modals/AddUserModal";
|
||||
import { compressImage, formatFileSize } from "@/utils/imageCompression";
|
||||
import { ModeToggle } from "@/components/mode-toggle";
|
||||
|
||||
// ===== FONCTIONS UTILITAIRES TIMEZONE EUROPE/PARIS =====
|
||||
|
||||
@@ -923,6 +924,8 @@ const Index = () => {
|
||||
Nouvelle Note
|
||||
</Button>
|
||||
|
||||
<ModeToggle />
|
||||
|
||||
{user && (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
|
||||
Reference in new issue
Block a user