mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 10:13:42 +00:00
Add files settings in UI (wip)
This commit is contained in:
parent
e5328c15d4
commit
d8d50582c3
7 changed files with 92 additions and 35 deletions
|
@ -15,12 +15,11 @@ import Mirai
|
|||
ColumnLayout {
|
||||
id: form
|
||||
spacing: 6
|
||||
signal confirmed
|
||||
signal confirmed(paths: var)
|
||||
|
||||
function reset() {
|
||||
internal.paths = backend.files.map(file => {
|
||||
return {path: file.path, name: file.name}
|
||||
})
|
||||
internal.paths = []
|
||||
internal.paths = backend.files.map(file => file.path)
|
||||
}
|
||||
|
||||
QtObject {
|
||||
|
@ -32,20 +31,25 @@ ColumnLayout {
|
|||
model: internal.paths
|
||||
ColumnLayout {
|
||||
AppLineEdit {
|
||||
text: modelData.name
|
||||
text: modelData
|
||||
onTextChanged: {
|
||||
internal.paths[index] = text
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AppLineEdit {
|
||||
text: modelData.path
|
||||
}
|
||||
AppButton {
|
||||
text: "+"
|
||||
onClicked: {
|
||||
internal.paths = [...internal.paths, ""]
|
||||
}
|
||||
}
|
||||
|
||||
AppButton {
|
||||
text: "Save"
|
||||
onClicked: {
|
||||
backend.
|
||||
form.confirmed()
|
||||
form.confirmed(internal.paths)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue