Skip to content

Commit c991a77

Browse files
Merge pull request #45 from yashyrs027/master
feat: implement centralized dual-theme system (light/dark)
2 parents 6eee84f + 2cf162e commit c991a77

73 files changed

Lines changed: 10234 additions & 1940 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/CommDesk-theme.doc.md

Lines changed: 594 additions & 0 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
<link rel="icon" type="image/png" href="/logo.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>CommDesk</title>
8+
<!-- Prevent flash of wrong theme on load -->
9+
<script>
10+
(function () {
11+
try {
12+
var stored = localStorage.getItem('commdesk-theme');
13+
var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
14+
var isDark = stored === 'dark' || (!stored && prefersDark);
15+
if (isDark) {
16+
document.documentElement.classList.add('dark');
17+
document.documentElement.setAttribute('data-theme', 'dark');
18+
}
19+
} catch (e) {}
20+
})();
21+
</script>
822
</head>
923

1024
<body>

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,34 @@
1717
},
1818
"dependencies": {
1919
"@hookform/resolvers": "^5.2.2",
20-
"@tanstack/react-query": "^5.100.8",
21-
"@tauri-apps/api": "^2.10.1",
22-
"@tauri-apps/plugin-opener": "^2.5.3",
20+
"@tanstack/react-query": "^5.100.9",
21+
"@tauri-apps/api": "^2.11.0",
22+
"@tauri-apps/plugin-opener": "^2.5.4",
2323
"@tauri-apps/plugin-process": "^2.3.1",
2424
"@tauri-apps/plugin-updater": "^2.10.1",
2525
"class-variance-authority": "^0.7.1",
2626
"clsx": "^2.1.1",
2727
"date-fns": "^4.1.0",
2828
"lucide-react": "^0.577.0",
2929
"markdown-to-jsx": "^9.7.16",
30+
"next-themes": "^0.4.6",
3031
"radix-ui": "^1.4.3",
31-
"react": "^19.2.5",
32+
"react": "^19.2.6",
3233
"react-day-picker": "^9.14.0",
33-
"react-dom": "^19.2.5",
34-
"react-hook-form": "^7.73.1",
34+
"react-dom": "^19.2.6",
35+
"react-hook-form": "^7.75.0",
3536
"react-icons": "^5.6.0",
36-
"react-router": "^7.14.2",
37-
"react-router-dom": "^7.14.2",
37+
"react-router": "^7.15.0",
38+
"react-router-dom": "^7.15.0",
3839
"recharts": "^3.8.1",
3940
"tailwind-merge": "^3.5.0",
40-
"zod": "^4.3.6"
41+
"zod": "^4.4.3"
4142
},
4243
"devDependencies": {
4344
"@eslint/js": "^9.39.4",
4445
"@tailwindcss/typography": "^0.5.19",
45-
"@tailwindcss/vite": "^4.2.4",
46-
"@tauri-apps/cli": "^2.10.1",
46+
"@tailwindcss/vite": "^4.3.0",
47+
"@tauri-apps/cli": "^2.11.1",
4748
"@types/markdown-to-jsx": "^7.0.1",
4849
"@types/react": "^19.2.14",
4950
"@types/react-dom": "^19.2.3",
@@ -52,14 +53,14 @@
5253
"eslint-config-prettier": "^10.1.8",
5354
"eslint-plugin-react-hooks": "^7.1.1",
5455
"eslint-plugin-react-refresh": "^0.5.2",
55-
"globals": "^17.5.0",
56+
"globals": "^17.6.0",
5657
"prettier": "^3.8.3",
5758
"shadcn": "^3.8.5",
58-
"tailwindcss": "^4.2.4",
59+
"tailwindcss": "^4.3.0",
5960
"tw-animate-css": "^1.4.0",
6061
"typescript": "~5.8.3",
61-
"typescript-eslint": "^8.59.0",
62-
"vite": "^7.3.2"
62+
"typescript-eslint": "^8.59.2",
63+
"vite": "^7.3.3"
6364
},
6465
"overrides": {
6566
"ip-address": "^10.1.1",

0 commit comments

Comments
 (0)