实现从文件安装依赖项;优化依赖项管理界面UI - #257
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 为移动端“依赖项管理”补齐“从本地文件安装 .oudep 依赖包”的完整交互链路(文件选择 → 后台安装 → 加载弹窗 → 安装完成提示/错误弹窗 → 刷新已安装列表),并对依赖项管理页的 UI / 主题体系做了一次 MD3 化整理(TabItem、TextBox、页面级 tokens 等),使界面更一致。
Changes:
- 实现从本地文件选择并安装依赖包,安装过程中使用通用 LoadingPopup 阻止交互并保证关闭时序。
- 重构 DependencyManager 视图布局与样式(tab 头、徽章、按钮、间距 tokens 等),并引入全局 TabItem / TextBox 样式。
- 补充 LoadingPopup 与“从文件安装”相关的多语言文案,并记录相应技术决策。
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| OpenUtauMobile/Views/DependencyManagerView.axaml | 依赖项管理页 UI 调整;“从文件安装”按钮增加安装中状态图标切换。 |
| OpenUtauMobile/ViewModels/LoadingPopupViewModel.cs | 新增通用加载弹窗 ViewModel,支持不定/定量进度与线程切换更新。 |
| OpenUtauMobile/ViewModels/DependencyManagerViewModel.cs | 实现从文件安装依赖包流程:文件选择、LoadingPopup 包裹安装、成功 toast、失败弹窗、刷新列表。 |
| OpenUtauMobile/Themes/OpenUtauMobile/Styles/Views/DependencyManagerView.axaml | DependencyManager 专用样式与 tokens 落地(卡片、tab、徽章、图标按钮等)。 |
| OpenUtauMobile/Themes/OpenUtauMobile/Styles/TextInput.axaml | 移除旧的 TextInput 样式文件。 |
| OpenUtauMobile/Themes/OpenUtauMobile/Styles/TextBox.axaml | 新增全局 TextBox 样式(含 placeholder、状态样式等)。 |
| OpenUtauMobile/Themes/OpenUtauMobile/Styles/TabItem.axaml | 新增全局 TabItem 次级样式模板(状态层、指示器、尺寸等)。 |
| OpenUtauMobile/Themes/OpenUtauMobile/Runtime/ThemeStaticTokens.cs | 增加 TabItem 与 DependencyManager 页面级 tokens(间距、徽章、尺寸等)。 |
| OpenUtauMobile/Themes/OpenUtauMobile/OpenUtauMobileTheme.axaml | 主题引用更新:切换到 TextBox.axaml,并引入 TabItem.axaml。 |
| OpenUtauMobile/Services/LoadingPopupService.cs | 新增 LoadingPopupService:统一弹窗显示、首帧让渡、任务执行与关闭时序。 |
| OpenUtauMobile/Controls/LoadingPopup.axaml.cs | 新增 LoadingPopup 控件 code-behind(紧凑宽度预设)。 |
| OpenUtauMobile/Controls/LoadingPopup.axaml | 新增 LoadingPopup UI:标题、消息、进度条与进度文本。 |
| OpenUtauMobile/Assets/Lang/Strings.zh-Hans.resx | 增加 LoadingPopup 与“从文件安装”相关中文文案。 |
| OpenUtauMobile/Assets/Lang/Strings.uk.resx | 增加 LoadingPopup 与“从文件安装”相关乌克兰语文案。 |
| OpenUtauMobile/Assets/Lang/Strings.ru.resx | 增加 LoadingPopup 与“从文件安装”相关俄语文案。 |
| OpenUtauMobile/Assets/Lang/Strings.ja.resx | 增加 LoadingPopup 与“从文件安装”相关日语文案。 |
| OpenUtauMobile/Assets/Lang/Strings.en.resx | 增加 LoadingPopup 与“从文件安装”相关英文文案。 |
| OpenUtauMobile/App.axaml.cs | 显式使用 Avalonia.Media.Color 类型接收主题 seed。 |
| .agent/DECISIONS.md | 记录 DependencyManager tokens / TabItem 全局化 / 从文件安装 / LoadingPopupService 的技术决策。 |
Comments suppressed due to low confidence (1)
OpenUtauMobile/Themes/OpenUtauMobile/Styles/Views/DependencyManagerView.axaml:41
- DependencyCountBadge text is using Sem.Color.OnError, which is intended for error surfaces and doesn’t match the badge background semantics. To follow the existing MD3 convention (PrimaryContainer + OnPrimaryContainer), the badge text should use OnPrimaryContainer.
<Setter Property="FontSize" Value="{x:Static theme:ThemeSemTypographyTokens.LabelSSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Foreground" Value="{DynamicResource Sem.Color.OnError}" />
<Setter Property="HorizontalAlignment" Value="Center" />
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+30
to
+33
| <Setter Property="Padding" Value="{x:Static theme:ThemeSemDependencyManagerTokens.BadgeInset}" /> | ||
| <Setter Property="CornerRadius" Value="{x:Static theme:ThemeSemDependencyManagerTokens.BadgeCorner}" /> | ||
| <Setter Property="Background" Value="{DynamicResource Sem.Color.OnPrimaryContainer}" /> | ||
| <Setter Property="VerticalAlignment" Value="Center" /> |
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.
No description provided.