mirror of
https://github.com/YGGverse/nexy.git
synced 2026-04-01 17:55:28 +00:00
group sort members
This commit is contained in:
parent
936b459f12
commit
917b1007ad
2 changed files with 36 additions and 24 deletions
|
|
@ -4,22 +4,26 @@ pub struct Time {
|
|||
pub is_modified: bool,
|
||||
}
|
||||
|
||||
pub struct DirSort {
|
||||
pub time: Time,
|
||||
pub is_count: bool,
|
||||
}
|
||||
|
||||
pub struct FileSort {
|
||||
pub time: Time,
|
||||
pub is_size: bool,
|
||||
}
|
||||
|
||||
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 sort: DirSort,
|
||||
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 sort: FileSort,
|
||||
pub time: Time,
|
||||
}
|
||||
|
||||
|
|
@ -40,10 +44,14 @@ 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,
|
||||
sort: DirSort {
|
||||
time: Time {
|
||||
is_accessed: config.list_dir_sort_accessed,
|
||||
is_created: config.list_dir_sort_created,
|
||||
is_modified: config.list_dir_sort_modified,
|
||||
},
|
||||
is_count: config.list_dir_sort_count,
|
||||
},
|
||||
},
|
||||
file: File {
|
||||
time: Time {
|
||||
|
|
@ -53,10 +61,14 @@ impl ListConfig {
|
|||
},
|
||||
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,
|
||||
sort: FileSort {
|
||||
time: Time {
|
||||
is_accessed: config.list_file_sort_accessed,
|
||||
is_created: config.list_file_sort_created,
|
||||
is_modified: config.list_file_sort_modified,
|
||||
},
|
||||
is_size: config.list_file_sort_size,
|
||||
},
|
||||
},
|
||||
time_format: config.list_time_format.clone(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue