2023-10-21 21:01:22 +13:00
|
|
|
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
|
|
|
|
import {CurrentTab} from "common.slint";
|
|
|
|
|
|
|
|
component TabItem {
|
|
|
|
in property <bool> scanning;
|
|
|
|
in-out property <CurrentTab> active-tab;
|
|
|
|
in property <string> text;
|
|
|
|
in property <CurrentTab> curr_tab;
|
|
|
|
|
|
|
|
Button {
|
|
|
|
enabled: !scanning;
|
|
|
|
text: root.text;
|
|
|
|
clicked => { root.active-tab = root.curr-tab; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export component LeftSidePanel {
|
|
|
|
in-out property <CurrentTab> active-tab;
|
|
|
|
in-out property <bool> scanning;
|
2023-10-22 22:32:13 +13:00
|
|
|
width: 120px;
|
2023-10-21 21:01:22 +13:00
|
|
|
|
|
|
|
VerticalLayout {
|
2023-10-22 22:32:13 +13:00
|
|
|
spacing: 20px;
|
|
|
|
Rectangle {
|
|
|
|
height: 100px;
|
|
|
|
Image {
|
|
|
|
width: root.width;
|
|
|
|
source: @image-url("../icons/logo.png");
|
|
|
|
}
|
2023-10-21 21:01:22 +13:00
|
|
|
}
|
2023-10-22 22:32:13 +13:00
|
|
|
VerticalLayout {
|
|
|
|
spacing: 3px;
|
|
|
|
alignment: center;
|
|
|
|
|
|
|
|
TabItem {
|
|
|
|
scanning: scanning;
|
|
|
|
text: "Empty Folders";
|
|
|
|
active-tab <=> root.active-tab;
|
|
|
|
curr_tab: CurrentTab.EmptyFolders;
|
|
|
|
}
|
|
|
|
TabItem {
|
|
|
|
scanning: scanning;
|
|
|
|
text: "Empty Files";
|
|
|
|
active-tab <=> root.active-tab;
|
|
|
|
curr_tab: CurrentTab.EmptyFiles;
|
|
|
|
}
|
|
|
|
TabItem {
|
|
|
|
scanning: scanning;
|
|
|
|
text: "Similar Images";
|
|
|
|
active-tab <=> root.active-tab;
|
|
|
|
curr_tab: CurrentTab.SimilarImages;
|
|
|
|
}
|
2023-10-21 21:01:22 +13:00
|
|
|
}
|
2023-10-22 22:32:13 +13:00
|
|
|
HorizontalLayout {
|
|
|
|
height: 20px;
|
|
|
|
alignment: end;
|
|
|
|
Image {
|
|
|
|
width: 20px;
|
|
|
|
source: @image-url("../icons/settings.png");
|
|
|
|
}
|
2023-10-21 21:01:22 +13:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|