mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 17:23:20 +00:00
Add Source creation/edition + Add missing edit forms for tasks and events
This commit is contained in:
parent
f1ac8a42d1
commit
a15c23bb21
24 changed files with 358 additions and 205 deletions
|
@ -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() }
|
||||
}
|
||||
}*/
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue