Skip to content

增加移动端适配#8

Merged
zhaiiker merged 2 commits into
zhaiiker:mainfrom
zhaiker01:main
May 21, 2026
Merged

增加移动端适配#8
zhaiiker merged 2 commits into
zhaiiker:mainfrom
zhaiker01:main

Conversation

@zhaiker01
Copy link
Copy Markdown

增加移动端适配

kiro-agent and others added 2 commits May 21, 2026 04:47
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
@zhaiiker zhaiiker merged commit 1d4108a into zhaiiker:main May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants