Commit Graph

16 Commits

Author SHA1 Message Date
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 243ecf14b0 refactor(api): remove DeleteMemoTag and RenameMemoTag endpoints
BREAKING CHANGE: Removed DeleteMemoTag and RenameMemoTag API endpoints
for better API consistency. Tags should now be managed by updating memo
content directly via UpdateMemo endpoint.

Backend changes:
- Remove RenameMemoTag and DeleteMemoTag RPC methods from proto
- Remove backend implementations in memo_service.go
- Regenerate protocol buffers (Go, TypeScript, OpenAPI)

Frontend changes:
- Remove RenameTagDialog component
- Simplify TagsSection to remove rename/delete functionality
- Improve tag styling with active state highlighting
- Add smooth transitions and better hover interactions
- Polish TagTree component for consistency
- Tags now only support click-to-filter (no inline editing)

Style improvements:
- Active tags highlighted with primary color and font-medium
- Consistent hover states across flat and tree views
- Better spacing and visual hierarchy
- Improved empty state styling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:32:47 +08:00
Steven bb5809cae4 refactor: attachment service 2025-06-17 22:15:19 +08:00
johnnyjoy 5e770dda52 refactor: memo name 2025-02-01 11:17:36 +08:00
Steven cfe1765067 chore: tweak user statistics view 2024-10-15 20:30:24 +08:00
Steven d11e7a3a9a chore: remove duplicated requests 2024-10-07 01:40:15 +08:00
Steven a8ea28066e chore: retire export memos 2024-08-28 23:20:32 +08:00
Steven cc91b1e512 chore: buf generate 2024-08-01 22:03:07 +08:00
Steven 139090fb8f chore: fix calendar timestamps 2024-07-27 09:47:12 +08:00
Steven 44e56844f5 chore: tweak search resources 2024-07-22 15:33:02 +08:00
Steven 1ab2c89408 feat(api): implement get memo by uid 2024-07-11 23:31:50 +08:00
Steven 797f5a123c feat: add `HasIncompleteTasks` to memo property 2024-06-05 08:39:56 +08:00
Steven e0600388b2 chore: implement memo property endpoint 2024-05-22 09:21:12 +08:00
Steven c561362d62 feat: implement memo property 2024-05-13 22:04:37 +08:00
Steven d0655ece53 refactor: update memo tags 2024-05-08 20:03:01 +08:00
Steven 1b291422e7 refactor: api version 2024-04-28 00:44:29 +08:00
Renamed from proto/gen/api/v2/memo_service_grpc.pb.go (Browse further)