Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3e2688

Browse files
committed
Download works, but no progress shown
1 parent95bec8e commitb3e2688

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

‎mutant-web/src/app/components/file_picker.rs‎

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,11 @@ impl FilePicker {
501501
returnfalse;
502502
}
503503

504+
// Skip files if we're in directory-only mode
505+
if !files_only && !node.is_directory{
506+
returnfalse;
507+
}
508+
504509
// Compact indentation with maximum depth limit to prevent exponential growth
505510
let indent_per_level =8.0;// Reduced from 12.0
506511
let max_indent =80.0;// Maximum indentation to prevent excessive nesting
@@ -589,14 +594,31 @@ impl FilePicker {
589594
icon_color
590595
);
591596

592-
// Draw folder name
597+
// Draw folder name with selection indicator
593598
let name_pos = egui::Pos2::new(icon_pos.x +16.0, text_y);
599+
let folder_name =if files_only{
600+
format!("{}/", node.name)
601+
}else{
602+
// In directory selection mode, add visual indicator that it's selectable
603+
if is_selected{
604+
format!("✓ {}/", node.name)
605+
}else{
606+
format!("{}/", node.name)
607+
}
608+
};
609+
610+
let name_color =if is_selected{
611+
MutantColors::ACCENT_ORANGE
612+
}else{
613+
icon_color
614+
};
615+
594616
ui.painter().text(
595617
name_pos,
596618
egui::Align2::LEFT_CENTER,
597-
format!("{}/", node.name),
619+
folder_name,
598620
icon_font_id,
599-
icon_color
621+
name_color
600622
);
601623

602624
// Handle directory interaction
@@ -605,13 +627,18 @@ impl FilePicker {
605627
// In files_only mode, just expand/collapse directories
606628
node.expanded = !node.expanded;
607629
}else{
608-
// In directory selection mode,allow selecting directories
630+
// In directory selection mode,single click selects, double click expands
609631
*selected_file_arc.write().unwrap() =Some(node.path.clone());
610632
*error_message.write().unwrap() =None;
611633
file_selected =true;
612634
}
613635
}
614636

637+
// Handle double-click to expand/collapse in directory selection mode
638+
if !files_only && button_response.double_clicked(){
639+
node.expanded = !node.expanded;
640+
}
641+
615642
if button_response.hovered(){
616643
ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
617644
}
@@ -737,6 +764,11 @@ impl FilePicker {
737764
});
738765

739766
for(_, child)in sorted_children{
767+
// Skip files if we're in directory-only mode
768+
if !files_only && !child.is_directory{
769+
continue;
770+
}
771+
740772
ifSelf::draw_tree_node_static(
741773
ui,
742774
child,

‎mutant-web/src/app/download_window.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ impl DownloadWindow {
129129
.strong()
130130
);
131131

132+
ui.add_space(4.0);
133+
134+
// Add helpful instruction
135+
ui.label(
136+
egui::RichText::new("Click on a folder to select it. Double-click to expand/collapse.")
137+
.size(11.0)
138+
.color(super::theme::MutantColors::TEXT_MUTED)
139+
.italics()
140+
);
141+
132142
ui.add_space(8.0);
133143

134144
// Directory picker (takes most of the space)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp