TODO
This commit is contained in:
parent
087c73aca7
commit
da6779735c
|
@ -1,7 +1,15 @@
|
|||
export enum CurrentTab {
|
||||
DuplicateFiles,
|
||||
EmptyFolders,
|
||||
BigFiles,
|
||||
EmptyFiles,
|
||||
TemporaryFiles,
|
||||
SimilarImages,
|
||||
SimilarVideos,
|
||||
MusicDuplicates,
|
||||
InvalidSymlinks,
|
||||
BrokenFiles,
|
||||
BadExtensions,
|
||||
Settings,
|
||||
About
|
||||
}
|
||||
|
|
|
@ -68,13 +68,14 @@ export component LeftSidePanel {
|
|||
callback changed_current_tab();
|
||||
width: 120px;
|
||||
VerticalLayout {
|
||||
spacing: 20px;
|
||||
spacing: 10px;
|
||||
Rectangle {
|
||||
visible: GuiState.active_tab != CurrentTab.About;
|
||||
height: 100px;
|
||||
height: 80px;
|
||||
Image {
|
||||
width: root.width;
|
||||
width: parent.height;
|
||||
source: @image-url("../icons/logo.png");
|
||||
image-fit: ImageFit.contain;
|
||||
}
|
||||
touch_area := TouchArea {
|
||||
clicked => {
|
||||
|
@ -86,33 +87,30 @@ export component LeftSidePanel {
|
|||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
// spacing: 3px;
|
||||
alignment: center;
|
||||
ListView {
|
||||
out property <length> element-size: 25px;
|
||||
TabItem {
|
||||
out property <[{name: string, tab: CurrentTab}]> speed_model: [
|
||||
{name: "Duplicate Files", tab: CurrentTab.DuplicateFiles},
|
||||
{name: "Empty Folders", tab: CurrentTab.EmptyFolders},
|
||||
{name: "Big Files", tab: CurrentTab.BigFiles},
|
||||
{name: "Empty Files", tab: CurrentTab.EmptyFiles},
|
||||
{name: "Temporary Files", tab: CurrentTab.TemporaryFiles},
|
||||
{name: "Similar Images", tab: CurrentTab.SimilarImages},
|
||||
{name: "Similar Videos", tab: CurrentTab.SimilarVideos},
|
||||
{name: "Music Duplicates", tab: CurrentTab.MusicDuplicates},
|
||||
{name: "Invalid Symlinks", tab: CurrentTab.InvalidSymlinks},
|
||||
{name: "Broken Files", tab: CurrentTab.BrokenFiles},
|
||||
{name: "Bad Extensions", tab: CurrentTab.BadExtensions}
|
||||
];
|
||||
|
||||
for r[idx] in speed_model: TabItem {
|
||||
height: parent.element-size;
|
||||
scanning: scanning;
|
||||
text: "Empty Folders";
|
||||
curr_tab: CurrentTab.EmptyFolders;
|
||||
text: r.name;
|
||||
curr_tab: r.tab;
|
||||
changed_current_tab() => {root.changed_current_tab();}
|
||||
}
|
||||
|
||||
TabItem {
|
||||
height: parent.element-size;
|
||||
scanning: scanning;
|
||||
text: "Empty Files";
|
||||
curr_tab: CurrentTab.EmptyFiles;
|
||||
changed_current_tab() => {root.changed_current_tab();}
|
||||
}
|
||||
|
||||
TabItem {
|
||||
height: parent.element-size;
|
||||
scanning: scanning;
|
||||
text: "Similar Images";
|
||||
curr_tab: CurrentTab.SimilarImages;
|
||||
changed_current_tab() => {root.changed_current_tab();}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -8,14 +8,30 @@ import {GuiState} from "gui_state.slint";
|
|||
import {About} from "about.slint";
|
||||
|
||||
export component MainList {
|
||||
in-out property <[MainListModel]> duplicate_files_model: [];
|
||||
in-out property <[MainListModel]> empty_folder_model: [
|
||||
{checked: false, selected_row: false, header_row: true, val_str: ["kropkarz", "/Xd1", "24.10.2023"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["kropkarz", "/Xd1", "24.10.2023"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []},
|
||||
{checked: true, selected_row: false, header_row: false, val_str: ["lokkaler", "/Xd1/Vide2", "01.23.1911"], val_int: []}
|
||||
];
|
||||
in-out property <[MainListModel]> empty_files_model;
|
||||
in-out property <[MainListModel]> similar_images_model;
|
||||
in-out property <[MainListModel]> big_files_model: [];
|
||||
in-out property <[MainListModel]> empty_files_model: [
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["kropkarz", "/Xd1", "24.10.2023"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []},
|
||||
{checked: true, selected_row: false, header_row: false, val_str: ["lokkaler", "/Xd1/Vide2", "01.23.1911"], val_int: []}
|
||||
];
|
||||
in-out property <[MainListModel]> temporary-files_model: [];
|
||||
in-out property <[MainListModel]> similar_images_model: [
|
||||
{checked: false, selected_row: false, header_row: true, val_str: ["Original", "500KB", "100x100", "kropkarz", "/Xd1", "24.10.2023"], val_int: []},
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["Similar", "500KB", "100x100", "witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []},
|
||||
{checked: true, selected_row: false, header_row: false, val_str: ["Similar", "500KB", "100x100", "lokkaler", "/Xd1/Vide2", "01.23.1911"], val_int: []}
|
||||
];
|
||||
in-out property <[MainListModel]> similar_videos_model: [];
|
||||
in-out property <[MainListModel]> similar_music_model: [];
|
||||
in-out property <[MainListModel]> invalid_symlinks_model: [];
|
||||
in-out property <[MainListModel]> broken_files_model: [];
|
||||
in-out property <[MainListModel]> bad_extensions_model: [];
|
||||
|
||||
callback changed_current_tab();
|
||||
callback released_key(string);
|
||||
|
||||
|
|
|
@ -43,19 +43,17 @@ export component MainWindow inherits Window {
|
|||
all_progress: 20,
|
||||
step_name: "Cache",
|
||||
};
|
||||
in-out property <[MainListModel]> empty_folder_model: [
|
||||
{checked: false, selected_row: false, header_row: true, val_str: ["kropkarz", "/Xd1", "24.10.2023"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []} ,
|
||||
{checked: true, selected_row: false, header_row: false, val_str: ["lokkaler", "/Xd1/Vide2", "01.23.1911"], val_int: []}
|
||||
];
|
||||
in-out property <[MainListModel]> empty_files_model: [
|
||||
{checked: false, selected_row: false, header_row: true, val_str: ["kropkarz", "/Xd1", "24.10.2023"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []} ,
|
||||
{checked: false, selected_row: false, header_row: false, val_str: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"], val_int: []} ,
|
||||
{checked: true, selected_row: false, header_row: false, val_str: ["lokkaler", "/Xd1/Vide2", "01.23.1911"], val_int: []}
|
||||
];
|
||||
in-out property <[MainListModel]> duplicate_files_model: [];
|
||||
in-out property <[MainListModel]> empty_folder_model: [];
|
||||
in-out property <[MainListModel]> big_files_model: [];
|
||||
in-out property <[MainListModel]> empty_files_model: [];
|
||||
in-out property <[MainListModel]> temporary-files_model: [];
|
||||
in-out property <[MainListModel]> similar_images_model: [];
|
||||
in-out property <[MainListModel]> similar_videos_model: [];
|
||||
in-out property <[MainListModel]> similar_music_model: [];
|
||||
in-out property <[MainListModel]> invalid_symlinks_model: [];
|
||||
in-out property <[MainListModel]> broken_files_model: [];
|
||||
in-out property <[MainListModel]> bad_extensions_model: [];
|
||||
|
||||
VerticalBox {
|
||||
HorizontalBox {
|
||||
|
@ -80,9 +78,17 @@ export component MainWindow inherits Window {
|
|||
width: preview_or_tool_settings.visible ? parent.width / 2 : parent.width;
|
||||
height: parent.height;
|
||||
horizontal-stretch: 0.5;
|
||||
duplicate_files_model <=> root.duplicate_files_model;
|
||||
empty_folder_model <=> root.empty_folder_model;
|
||||
big_files_model <=> root.big_files_model;
|
||||
empty_files_model <=> root.empty_files_model;
|
||||
temporary-files_model <=> root.temporary-files_model;
|
||||
similar_images_model <=> root.similar_images_model;
|
||||
similar_videos_model <=> root.similar_videos_model;
|
||||
similar_music_model <=> root.similar_music_model;
|
||||
invalid_symlinks_model <=> root.invalid_symlinks_model;
|
||||
broken_files_model <=> root.broken_files_model;
|
||||
bad_extensions_model <=> root.bad_extensions_model;
|
||||
}
|
||||
preview_or_tool_settings := Rectangle {
|
||||
visible: (GuiState.preview_visible || tool_settings.visible) && GuiState.is_tool_tab_active;
|
||||
|
|
Loading…
Reference in a new issue