summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-17 12:27:03 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-17 12:27:03 +0200
commitccce242c848594643c5bebc78cf7d0452b311ebf (patch)
treefc1fdea7a3600ac2b87e62cee65124ecc0cc8072 /views
parentbe495877931f1f811f46a442e175e2ee53949a29 (diff)
downloadkube-ccce242c848594643c5bebc78cf7d0452b311ebf.tar.gz
kube-ccce242c848594643c5bebc78cf7d0452b311ebf.zip
React to removal of last account
Diffstat (limited to 'views')
-rw-r--r--views/accounts/qml/View.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/views/accounts/qml/View.qml b/views/accounts/qml/View.qml
index 5fe307a2..84ba2ef1 100644
--- a/views/accounts/qml/View.qml
+++ b/views/accounts/qml/View.qml
@@ -70,6 +70,11 @@ FocusScope {
70 70
71 model: Kube.AccountsModel {} 71 model: Kube.AccountsModel {}
72 72
73 onCountChanged: {
74 if (count == 0) {
75 edit.accountId = ""
76 }
77 }
73 onCurrentItemChanged: { 78 onCurrentItemChanged: {
74 if (currentItem) { 79 if (currentItem) {
75 edit.accountId = currentItem.currentData.accountId 80 edit.accountId = currentItem.currentData.accountId
@@ -109,6 +114,13 @@ FocusScope {
109 114
110 canRemove: !root.singleAccountMode 115 canRemove: !root.singleAccountMode
111 116
117 onAccountIdChanged: {
118 if (accountId == "") {
119 //Require the setup to be completed since it's the first account
120 accountWizardComponent.createObject(root, {requireSetup: true}).open()
121 }
122 }
123
112 Component.onCompleted: { 124 Component.onCompleted: {
113 //We don't have any accounts setup if accountId is empty, so we trigger the accountWizard 125 //We don't have any accounts setup if accountId is empty, so we trigger the accountWizard
114 //FIXME: this assumes we load accounts synchronously, which we do right now. 126 //FIXME: this assumes we load accounts synchronously, which we do right now.