增加移动端适配#8
Merged
Merged
Conversation
1. Fix i18n language persistence:
- Remove i18next-browser-languagedetector to eliminate race condition
with zustand's persist middleware (both were writing to localStorage
independently causing conflicts on reload)
- Read initial language directly from zustand's persisted localStorage
key (chat2api-settings) with browser navigator fallback
- Zustand onRehydrateStorage callback still syncs i18n on hydration
2. Fix mobile responsiveness:
- Add MobileSidebar component with slide-in overlay for mobile nav
- Add hamburger menu button in Header (visible only on mobile)
- Hide desktop Sidebar on screens < md breakpoint
- Make Dialog component width responsive (calc(100%-2rem) on mobile)
- Hide less-important table columns (provider, account, usage, date)
on small screens using hidden sm:table-cell / md:table-cell
- Responsive main content padding (p-3 → sm:p-4 → md:p-6)
- Settings tabs: 3-col grid on mobile, 5-col on sm+
- Add mobile CSS: reduce bokeh effects, smaller table cells,
disable tooltips on touch devices
- Responsive header spacing and proxy status display
3. Minor improvements:
- Add nav.menu translation key for mobile sidebar title
- Exclude mobileSidebarOpen from zustand persistence
- ApiKeys card header stacks vertically on mobile
Co-authored-by: zhaiker01 <285887163+zhaiker01@users.noreply.github.com>
…responsive fix: language persistence and mobile responsiveness
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.
增加移动端适配