File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,6 +209,40 @@ impl AppDataCleaner {
209209 // 移动窗口
210210 self . clear_tab . move_module . show_move_window ( ctx) ;
211211 }
212+
213+ fn show_custom_location_window ( & mut self , ctx : & egui:: Context ) {
214+ if self . show_custom_location_window {
215+ egui:: Window :: new ( "添加自定义位置" )
216+ . collapsible ( false )
217+ . resizable ( false )
218+ . show ( ctx, |ui| {
219+ ui. label ( "路径名称:" ) ;
220+ let mut name = String :: new ( ) ;
221+ ui. text_edit_singleline ( & mut name) ;
222+
223+ ui. label ( "路径地址:" ) ;
224+ let mut path = String :: new ( ) ;
225+ ui. horizontal ( |ui| {
226+ ui. text_edit_singleline ( & mut path) ;
227+ if ui. button ( "选择..." ) . clicked ( ) {
228+ // 打开文件夹选择对话框逻辑(需实现)
229+ }
230+ } ) ;
231+
232+ ui. horizontal ( |ui| {
233+ if ui. button ( "确定" ) . clicked ( ) {
234+ if let Some ( custom_locations) = & mut self . custom_locations {
235+ custom_locations. push ( ( name. clone ( ) , path. clone ( ) ) ) ;
236+ }
237+ self . show_custom_location_window = false ;
238+ }
239+ if ui. button ( "取消" ) . clicked ( ) {
240+ self . show_custom_location_window = false ;
241+ }
242+ } ) ;
243+ } ) ;
244+ }
245+ }
212246}
213247
214248impl eframe:: App for AppDataCleaner {
You can’t perform that action at this time.
0 commit comments