add:テーマ機能 - #5
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a user-selectable theme feature for the client UI, including persistence and early application to reduce startup flicker. It also updates multiple views/components to use new theme-driven color tokens.
Changes:
- Add theme preference model + application helpers (document + Tauri window), and persist theme to localStorage/SQLite.
- Add a Theme section to Settings and propagate theme-aware text/icon styles across views/components.
- Introduce CSS theme tokens (including calendar heatmap + ranking/warning colors) and switch UI styling to rely on them.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| client/src/views/WorldsView.tsx | Switch headings to theme-driven primary text color. |
| client/src/views/SettingsView.tsx | Add Theme selection UI and persistence logic; update various text colors to theme token. |
| client/src/views/RankingView.tsx | Replace hardcoded medal colors with theme tokens; adjust heading text color. |
| client/src/views/FavoritesView.tsx | Switch title text to theme-driven primary color. |
| client/src/views/CalendarView.tsx | Make heatmap colors/theme tokens; adjust headings/hover text to use theme token. |
| client/src/store/useAppStore.ts | Add theme state + caching in the store. |
| client/src/main.tsx | Apply cached theme before first React render to reduce flicker. |
| client/src/lib/theme.ts | New theme preference/types + document/window theme application utilities. |
| client/src/lib/strings.ts | Add theme-related strings. |
| client/src/index.css | Add theme variables, utilities, and token-based styling for multiple themes. |
| client/src/hooks/useTheme.ts | New hook to apply theme changes to document and native window. |
| client/src/hooks/useInitApp.ts | Restore theme from SQLite on startup. |
| client/src/components/UploadWarningDialog.tsx | Use theme token for warning icon/title color. |
| client/src/components/UpdateDialog.tsx | Use theme-driven primary text color and adjust button hover color. |
| client/src/components/OnboardingOverlay.tsx | Update title text color; remove backdrop blur. |
| client/src/components/AutoStartDialog.tsx | Use theme-driven primary text color and adjust button hover color. |
| client/src/components/AppShell.tsx | Activate theme hook; swap hardcoded overlay colors for CSS variables; remove glow utility usage. |
| client/src-tauri/Cargo.lock | Bump app version recorded in lockfile. |
| client/src-tauri/capabilities/default.json | Allow Tauri window theme setting capability. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+135
to
+136
| isSavingThemeRef.current = false; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.