diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-07 17:07:29 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-07 22:44:36 +0200 |
commit | 6f4e9230a88bc2262a1093ae9f2507f1160bff54 (patch) | |
tree | 12fed1e37e452bf4b4bf8986492e0bdfe28a8b38 /components/accounts/contents/ui/AccountWizard.qml | |
parent | b7b5ec6b6b6dc269500574ea6d8c34852179edc7 (diff) | |
download | kube-6f4e9230a88bc2262a1093ae9f2507f1160bff54.tar.gz kube-6f4e9230a88bc2262a1093ae9f2507f1160bff54.zip |
Single account mode
It's hardcoded to be enabled and set to kolabnow at the moment (TBD).
Diffstat (limited to 'components/accounts/contents/ui/AccountWizard.qml')
-rw-r--r-- | components/accounts/contents/ui/AccountWizard.qml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/components/accounts/contents/ui/AccountWizard.qml b/components/accounts/contents/ui/AccountWizard.qml index ea7b491f..996eeb6c 100644 --- a/components/accounts/contents/ui/AccountWizard.qml +++ b/components/accounts/contents/ui/AccountWizard.qml | |||
@@ -22,11 +22,15 @@ import QtQuick.Controls 2.0 as Controls2 | |||
22 | import org.kube.framework 1.0 as Kube | 22 | import org.kube.framework 1.0 as Kube |
23 | 23 | ||
24 | Kube.Popup { | 24 | Kube.Popup { |
25 | id: popup | 25 | id: root |
26 | |||
27 | |||
28 | property bool singleAccountMode: false | ||
29 | property string forceAccountType: "" | ||
26 | 30 | ||
27 | modal: true | 31 | modal: true |
28 | focus: true | 32 | focus: true |
29 | closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutside | 33 | closePolicy: singleAccountMode ? Controls2.Popup.NoAutoClose : Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutside |
30 | 34 | ||
31 | clip: true | 35 | clip: true |
32 | 36 | ||
@@ -35,7 +39,12 @@ Kube.Popup { | |||
35 | 39 | ||
36 | anchors.fill: parent | 40 | anchors.fill: parent |
37 | 41 | ||
38 | initialItem: mainView | 42 | initialItem: root.singleAccountMode ? null : mainView |
43 | Component.onCompleted: { | ||
44 | if (root.singleAccountMode) { | ||
45 | stack.push(wizardPage.createObject(app, {accountType: root.forceAccountType})) | ||
46 | } | ||
47 | } | ||
39 | } | 48 | } |
40 | 49 | ||
41 | Component { | 50 | Component { |
@@ -72,8 +81,9 @@ Kube.Popup { | |||
72 | Component { | 81 | Component { |
73 | id: wizardPage | 82 | id: wizardPage |
74 | AccountWizardPage { | 83 | AccountWizardPage { |
84 | singleAccountMode: root.singleAccountMode | ||
75 | onDone: { | 85 | onDone: { |
76 | popup.close() | 86 | root.close() |
77 | Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) | 87 | Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) |
78 | } | 88 | } |
79 | } | 89 | } |