Add default path when creating new source

This commit is contained in:
Vyn 2024-11-04 12:36:18 +01:00
parent 14d04f6a77
commit d6c781faa2
7 changed files with 24 additions and 6 deletions

View file

@ -41,7 +41,7 @@ export component SideBar inherits Rectangle {
text: item.name;
text-alignment: left;
active: item.selected;
clicked => { Backend.source-clicked(index) }
clicked => { Backend.source-clicked(item.id) }
VActionButton {
visible: parent.active;
icon-svg: Svg.cog;

View file

@ -12,14 +12,18 @@ export component AddSourceWindow inherits Window {
default-font-size: 16px;
background: Palette.background;
in-out property <string> default-source-path;
VerticalLayout {
padding: 16px;
spacing: 8px;
nameInput := VTextInput {
label: "Name";
text: "todo";
}
pathInput := VTextInput {
label: "Path";
text: root.default-source-path + nameInput.text + ".md";
}
VButton {
text: "Create";