summaryrefslogtreecommitdiffstats
path: root/components/accounts/contents/ui/AccountWizardPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/accounts/contents/ui/AccountWizardPage.qml')
-rw-r--r--components/accounts/contents/ui/AccountWizardPage.qml22
1 files changed, 13 insertions, 9 deletions
diff --git a/components/accounts/contents/ui/AccountWizardPage.qml b/components/accounts/contents/ui/AccountWizardPage.qml
index 74decf1f..18001419 100644
--- a/components/accounts/contents/ui/AccountWizardPage.qml
+++ b/components/accounts/contents/ui/AccountWizardPage.qml
@@ -32,6 +32,16 @@ FocusScope {
32 property bool isFirstView: root.Controls2.StackView.index == 0 32 property bool isFirstView: root.Controls2.StackView.index == 0
33 property bool requireSetup: false 33 property bool requireSetup: false
34 34
35 function save() {
36 if (loader.item.valid) {
37 loader.item.save()
38 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountIdentifier});
39 root.done()
40 } else {
41 console.warn("Invalid settings.");
42 }
43 }
44
35 Kube.AccountFactory { 45 Kube.AccountFactory {
36 id: accountFactory 46 id: accountFactory
37 accountType: root.accountType 47 accountType: root.accountType
@@ -47,6 +57,8 @@ FocusScope {
47 } 57 }
48 } 58 }
49 59
60 Keys.onReturnPressed: save()
61
50 //Item to avoid anchors conflict with stack 62 //Item to avoid anchors conflict with stack
51 Item { 63 Item {
52 anchors{ 64 anchors{
@@ -135,15 +147,7 @@ FocusScope {
135 } 147 }
136 148
137 text: qsTr("Save") 149 text: qsTr("Save")
138 onClicked: { 150 onClicked: save()
139 if (loader.item.valid) {
140 loader.item.save()
141 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountIdentifier});
142 root.done()
143 } else {
144 console.warn("Invalid settings.");
145 }
146 }
147 } 151 }
148 } 152 }
149 } 153 }