Add Source creation/edition + Add missing edit forms for tasks and events

This commit is contained in:
Vyn 2024-11-01 13:43:45 +01:00
parent f1ac8a42d1
commit a15c23bb21
24 changed files with 358 additions and 205 deletions

View file

@ -1,5 +1,5 @@
import { Backend } from "../Backend.slint";
import { VButton, ToggleButton, VText, Svg, Palette } from "@selenite";
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
export component SideBar inherits Rectangle {
background: Palette.pane;
@ -8,9 +8,20 @@ export component SideBar inherits Rectangle {
height: parent.height;
padding: 16px;
spacing: 16px;
VText {
text: "Sources";
font-size: 1.5rem;
HorizontalLayout {
alignment: space-between;
spacing: 64px;
VText {
text: "Sources";
font-size: 1.5rem;
}
VActionButton {
icon-svg: Svg.plus;
icon-colorize: Palette.green;
background: transparent;
clicked => { Backend.add-source-clicked() }
}
}
VerticalLayout {
alignment: space-between;
@ -23,23 +34,31 @@ export component SideBar inherits Rectangle {
text-alignment: left;
active: Backend.no-source-selected;
clicked => { Backend.source-clicked(-1) }
}
for item[index] in Backend.sources-selected: ToggleButton {
text: item.name;
text-alignment: left;
active: item.selected;
clicked => { Backend.source-clicked(index) }
VActionButton {
visible: parent.active;
icon-svg: Svg.cog;
background: transparent;
clicked => { Backend.edit-source-clicked(item.id) }
}
}
}
/*VerticalLayout {
VerticalLayout {
spacing: 4px;
VButton {
/*VButton {
icon-svg: Svg.cog;
text: "Settings";
background: transparent;
clicked => { Backend.settings-clicked() }
}
}*/
}*/
}
}
}
}