Skip to content

fix(mobile): adapt LLM settings dialog and PPT touch-action for Android - #14

Merged
1firecracker merged 2 commits into
1firecracker:android-appfrom
remote-controlled-man:fix/android-app-mobile
Apr 30, 2026
Merged

1firecracker merged 2 commits into
1firecracker:android-appfrom
remote-controlled-man:fix/android-app-mobile

Conversation

@remote-controlled-man

Copy link
Copy Markdown

背景

本 PR 针对 android-app 分支(commit 5bfc48b "Add Android app mobile adaptation"),修复两个移动端体验问题 。

改动

1. LLM 配置弹窗适配小屏(SettingsDialog.vue)

  • 弹窗 width="800px" 在 ≤768px 屏幕溢出 → 用 @media 覆盖为 95vw
  • el-form-item 横向 120px label 把输入框挤到几乎不可用 → 移动端切换为 label 在上、input 在下,输入框占满宽度
  • .provider-header flex 改纵向堆叠,避免标题和"刷新模型列表"按钮挤压
  • 纯 CSS + @media (max-width: 768px) 实现,桌面端零影响

2. PPT 浏览触摸适配(SlideViewer.vue)

  • touch-action: pan-y 禁止了横向滑动和双指缩放 → 改为 pan-x pan-y pinch-zoom
  • 大尺寸 PPT 现在可以横向拖看,双指缩放恢复

测试

  • Chrome DevTools 模拟 Pixel 5(393×851):弹窗 95% 宽 / label 上下排 / 横向滑动 / 缩放正常
  • 桌面尺寸(>768px)下与改动前完全一致
  • Android 模拟器实测可正常配置 LLM 和浏览 PPT

风险

两处改动都包在 @media (max-width: 768px) 块里,桌面端浏览器根本不解析,不影响 web 端行为。!important 用于覆盖 Element Plus 内联样式,作用域被 .settings-llm-dialog class 限定。

Copilot AI review requested due to automatic review settings April 30, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the mobile experience on Android by adapting the LLM settings dialog layout for small screens and restoring expected touch interactions (horizontal pan + pinch zoom) in the PPT slide viewer.

Changes:

  • Add mobile-specific CSS to prevent SettingsDialog.vue from overflowing on small screens and to reflow form labels/inputs for usability.
  • Update SlideViewer.vue mobile touch-action to allow horizontal panning and pinch zoom.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/components/SettingsDialog.vue Adds mobile responsive styling for the Element Plus dialog and form layout.
frontend/src/modules/documents/components/PPTViewer/SlideViewer.vue Adjusts mobile touch-action to re-enable pan/zoom gestures on Android.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +275 to +298
<style>
@media (max-width: 768px) {
.settings-llm-dialog {
width: 95% !important;
max-width: 95vw !important;
margin: 5vh auto !important;
}

.settings-llm-dialog .el-form-item {
display: block;
margin-bottom: 18px;
}
.settings-llm-dialog .el-form-item__label {
width: auto !important;
text-align: left;
padding: 0 0 4px 0;
line-height: 1.4;
height: auto;
float: none;
}
.settings-llm-dialog .el-form-item__content {
margin-left: 0 !important;
}
}
@1firecracker
1firecracker merged commit 4148d10 into 1firecracker:android-app Apr 30, 2026
@remote-controlled-man
remote-controlled-man deleted the fix/android-app-mobile branch April 30, 2026 16:16
1firecracker pushed a commit that referenced this pull request May 10, 2026
The :deep() approach in PR #14 didn't match because el-dialog teleports
to body, breaking Vue's scoped data-v inheritance, so the mobile
overrides were silently inactive on phone-sized viewports. Switch to
:global() inside scoped style, matching the existing pattern in
ChatView.vue and MindMapViewer.vue.
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