monobean:refactor codepage related to #1244#1288
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codepage interface and restructures the Mega settings tab. The main purpose is to move the Mega settings from an embedded tab to a popup window and enhance the file tree with icon support.
- Refactored the Mega tab component from an embedded widget to a standalone popup window
- Enhanced file tree with file type-specific icons for better visual organization
- Added history list component and UI improvements to the code page with sidebar buttons
Reviewed Changes
Copilot reviewed 18 out of 30 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| monobean/src/window.rs | Restructured window layout and moved Mega settings to popup window functionality |
| monobean/src/components/mega_tab.rs | Converted MegaTab from Box widget to standalone Window |
| monobean/src/components/file_tree.rs | Enhanced with file type icons based on file extensions |
| monobean/src/components/code_page.rs | Added sidebar buttons, history list, and file path display |
| monobean/src/components/history_list.rs | New component for displaying commit history |
| monobean/resources/gtk/mega_tab_window.ui | New UI file for the popup Mega settings window |
| monobean/resources/gtk/window.ui | Updated main window layout with bottom status bar |
| monobean/resources/gtk/code_page.ui | Enhanced with sidebar and popover components |
Comments suppressed due to low confidence (1)
| use super::*; | ||
| use crate::components::code_page::CodePage; | ||
| use crate::components::hello_page::HelloPage; | ||
| // use crate::components::not_implemented::NotImplemented; |
There was a problem hiding this comment.
Remove commented-out import statement that is no longer needed.
| // use crate::components::not_implemented::NotImplemented; |
| // #[template_child] | ||
| // pub mega_tab: TemplateChild<MegaTab>, | ||
| // #[template_child] | ||
| // pub repo_tab: TemplateChild<RepoTab>, |
There was a problem hiding this comment.
Remove commented-out template_child declarations that are no longer used.
| // #[template_child] | |
| // pub mega_tab: TemplateChild<MegaTab>, | |
| // #[template_child] | |
| // pub repo_tab: TemplateChild<RepoTab>, | |
| // Removed unused commented-out template_child declarations for mega_tab and repo_tab. |
| // #[template_child] | ||
| // pub tree_lines: TemplateChild<gtk::DrawingArea>, |
There was a problem hiding this comment.
Remove commented-out template_child declaration for tree_lines that is no longer used.
| // #[template_child] | |
| // pub tree_lines: TemplateChild<gtk::DrawingArea>, |
| let imp = self.imp(); | ||
| let label = imp.label.get(); | ||
| let icon = imp.icon.get(); | ||
| //let tree_line = imp.tree_lines.get(); |
There was a problem hiding this comment.
Remove commented-out variable declaration that is no longer used.
| //let tree_line = imp.tree_lines.get(); |
| #[weak(rename_to=this)] | ||
| self, | ||
| async move { | ||
| timeout_future(Duration::from_millis(1500)).await; |
There was a problem hiding this comment.
The hardcoded timeout value of 1500ms should be extracted as a named constant for better maintainability.
| timeout_future(Duration::from_millis(1500)).await; | |
| timeout_future(Duration::from_millis(PGP_SETUP_TIMEOUT_MS)).await; |
| let store = ListStore::new::<HistoryItem>(); | ||
|
|
||
| for i in 1..=20 { | ||
| store.append(&HistoryItem::new(&format!("commit信息 \n 提交人:{i}, sha"))); |
There was a problem hiding this comment.
This appears to be mock data that should be replaced with actual commit history data.
| #once_cell = "1.21.3" | ||
|
|
There was a problem hiding this comment.
Remove commented-out dependency that is not being used.
| #once_cell = "1.21.3" |
| tempfile = { workspace = true } | ||
| indexmap = { workspace = true } | ||
| url = { workspace = true } | ||
| #url = { workspace = true } |
There was a problem hiding this comment.
Remove commented-out duplicate dependency declaration.
| #url = { workspace = true } |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: pleasedontbreak123 <nabeiyq@126.com>
1 refactor codepage
2 move mage setting page to popup
3 auto load png keys