primitive color picker, asset form
This commit is contained in:
parent
9a5a0b27a2
commit
374551d2bb
12 changed files with 207 additions and 57 deletions
|
@ -31,7 +31,7 @@ Item {
|
|||
model: Magpie.assets
|
||||
spacing: 5
|
||||
delegate: Components.AssetLine {
|
||||
height: 20
|
||||
height: 30
|
||||
width: listView.width
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,32 @@ Item {
|
|||
|
||||
Component {
|
||||
id: addAssetForm
|
||||
Forms.AddAsset {
|
||||
Forms.Asset {
|
||||
onCancel: stack.pop()
|
||||
onSuccess: stack.pop()
|
||||
onConfirm: function (title, icon, color, currency) {
|
||||
if (modal.inProgress)
|
||||
return;
|
||||
|
||||
modal.inProgress = true;
|
||||
modal.status = qsTr("Creating new asset ") + " " + title + "...";
|
||||
modal.open();
|
||||
|
||||
API.addAsset(title, icon, color, currency, function (err, result) {
|
||||
if (!modal.inProgress)
|
||||
return;
|
||||
|
||||
modal.inProgress = false;
|
||||
if (err)
|
||||
modal.status = err;
|
||||
else
|
||||
modal.status = qsTr("Success");
|
||||
|
||||
if (!!result) {
|
||||
modal.close();
|
||||
stack.pop()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue