Commit Graph

10 Commits

Author SHA1 Message Date
Johnny 7932f6d0d0
refactor: user auth improvements (#5360) 2025-12-18 18:15:51 +08:00
Steven 81da20c905 refactor: simplify theme/locale to user preferences and improve initialization
Remove theme and locale from instance settings to eliminate duplication and
simplify the codebase. These are user-specific preferences and should only
exist in user settings, not instance-wide settings.

Backend changes:
- Remove theme from InstanceGeneralSetting proto
- Remove locale from InstanceCustomProfile proto
- Update instance service converters to remove theme/locale handling
- Simplify RSS feed to use static locale

Frontend changes:
- Remove theme/locale from instanceStore state
- Create unified initialization flow with clear fallback priority:
  * Theme: user setting → localStorage → system preference
  * Locale: user setting → browser language
- Add applyUserPreferences() to centralize theme/locale application
- Simplify App.tsx by removing redundant state synchronization
- Update all components to use new helper functions:
  * getThemeWithFallback() for theme resolution
  * getLocaleWithFallback() for locale resolution
- Remove theme/locale selectors from instance profile dialog

Theme utilities refactor:
- Organize code into clear sections with JSDoc comments
- Extract localStorage operations into getStoredTheme/setStoredTheme helpers
- Split DOM manipulation into focused functions
- Improve type safety with Theme and ResolvedTheme types
- Reduce code duplication and improve maintainability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:08:46 +08:00
Steven 42d1650c6d chore: tweak auth service 2025-06-24 23:31:37 +08:00
Steven 5821bb7a65 chore: update auth service 2025-06-23 20:31:18 +08:00
Johnny 741fe35c2a refactor: rename session methods in auth service 2025-06-21 00:00:58 +08:00
Steven d71fd2f84a refactor: auth service 2025-06-18 20:25:46 +08:00
johnnyjoy ca79990679 refactor: merge sign in requests 2025-05-14 22:13:52 +08:00
Steven cc91b1e512 chore: buf generate 2024-08-01 22:03:07 +08:00
Steven 797f5a123c feat: add `HasIncompleteTasks` to memo property 2024-06-05 08:39:56 +08:00
Steven 1b291422e7 refactor: api version 2024-04-28 00:44:29 +08:00
Renamed from proto/gen/api/v2/auth_service_grpc.pb.go (Browse further)