mirror of
https://github.com/YGGverse/nexy.git
synced 2026-04-01 09:45:29 +00:00
implement list sort options
This commit is contained in:
parent
0a22d1388c
commit
520b9c5695
4 changed files with 103 additions and 7 deletions
|
|
@ -7,11 +7,19 @@ pub struct Time {
|
|||
pub struct Dir {
|
||||
pub is_count: bool,
|
||||
pub is_reverse: bool,
|
||||
pub is_sort_accessed: bool,
|
||||
pub is_sort_count: bool,
|
||||
pub is_sort_created: bool,
|
||||
pub is_sort_modified: bool,
|
||||
pub time: Time,
|
||||
}
|
||||
pub struct File {
|
||||
pub is_reverse: bool,
|
||||
pub is_size: bool,
|
||||
pub is_sort_accessed: bool,
|
||||
pub is_sort_created: bool,
|
||||
pub is_sort_modified: bool,
|
||||
pub is_sort_size: bool,
|
||||
pub time: Time,
|
||||
}
|
||||
|
||||
|
|
@ -32,6 +40,10 @@ impl ListConfig {
|
|||
},
|
||||
is_count: config.list_dir_count,
|
||||
is_reverse: config.list_dir_reverse,
|
||||
is_sort_accessed: config.list_dir_sort_accessed,
|
||||
is_sort_created: config.list_dir_sort_created,
|
||||
is_sort_modified: config.list_dir_sort_modified,
|
||||
is_sort_count: config.list_dir_sort_count,
|
||||
},
|
||||
file: File {
|
||||
time: Time {
|
||||
|
|
@ -39,8 +51,12 @@ impl ListConfig {
|
|||
is_created: config.list_file_created,
|
||||
is_modified: config.list_file_modified,
|
||||
},
|
||||
is_size: config.list_file_size,
|
||||
is_reverse: config.list_file_reverse,
|
||||
is_size: config.list_file_size,
|
||||
is_sort_accessed: config.list_file_sort_accessed,
|
||||
is_sort_created: config.list_file_sort_created,
|
||||
is_sort_modified: config.list_file_sort_modified,
|
||||
is_sort_size: config.list_file_sort_size,
|
||||
},
|
||||
time_format: config.list_time_format.clone(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue