diff options
Diffstat (limited to 'components/accounts/contents/ui')
-rw-r--r-- | components/accounts/contents/ui/AccountWizard.qml | 128 | ||||
-rw-r--r-- | components/accounts/contents/ui/CreateGmail.qml | 208 | ||||
-rw-r--r-- | components/accounts/contents/ui/CreateImap.qml | 165 | ||||
-rw-r--r-- | components/accounts/contents/ui/CreateKolabNow.qml | 208 | ||||
-rw-r--r-- | components/accounts/contents/ui/CreateMaildir.qml | 201 | ||||
-rw-r--r-- | components/accounts/contents/ui/EditImap.qml | 1 | ||||
-rw-r--r-- | components/accounts/contents/ui/EditKolabNow.qml | 1 | ||||
-rw-r--r-- | components/accounts/contents/ui/EditMaildir.qml | 1 | ||||
-rw-r--r-- | components/accounts/contents/ui/main.qml | 30 |
9 files changed, 943 insertions, 0 deletions
diff --git a/components/accounts/contents/ui/AccountWizard.qml b/components/accounts/contents/ui/AccountWizard.qml new file mode 100644 index 00000000..8cc90acb --- /dev/null +++ b/components/accounts/contents/ui/AccountWizard.qml | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 2.0 as Controls2 | ||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Controls2.Popup { | ||
25 | id: popup | ||
26 | |||
27 | modal: true | ||
28 | focus: true | ||
29 | closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent | ||
30 | |||
31 | clip: true | ||
32 | |||
33 | Controls2.StackView { | ||
34 | id: stack | ||
35 | |||
36 | anchors.fill: parent | ||
37 | |||
38 | initialItem: mainView | ||
39 | } | ||
40 | |||
41 | Component { | ||
42 | id: mainView | ||
43 | |||
44 | Item { | ||
45 | |||
46 | ColumnLayout { | ||
47 | |||
48 | anchors.centerIn: parent | ||
49 | |||
50 | width: parent.width * 0.4 | ||
51 | |||
52 | spacing: Kirigami.Units.largeSpacing | ||
53 | |||
54 | Controls2.Button { | ||
55 | |||
56 | Layout.fillWidth: true | ||
57 | |||
58 | text: "kolabnow account" | ||
59 | |||
60 | onClicked: { | ||
61 | stack.push(kolabnow) | ||
62 | } | ||
63 | } | ||
64 | |||
65 | Controls2.Button { | ||
66 | |||
67 | Layout.fillWidth: true | ||
68 | |||
69 | text: "gmail account" | ||
70 | |||
71 | onClicked: { | ||
72 | stack.push(gmail) | ||
73 | } | ||
74 | } | ||
75 | |||
76 | Controls2.Button { | ||
77 | |||
78 | Layout.fillWidth: true | ||
79 | |||
80 | text: "imap account" | ||
81 | |||
82 | onClicked: { | ||
83 | stack.push(imap) | ||
84 | } | ||
85 | } | ||
86 | |||
87 | Controls2.Button { | ||
88 | |||
89 | Layout.fillWidth: true | ||
90 | |||
91 | text: "maildir archive" | ||
92 | |||
93 | onClicked: { | ||
94 | stack.push(maildir) | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | |||
101 | Component { | ||
102 | id: kolabnow | ||
103 | |||
104 | CreateKolabNow { | ||
105 | } | ||
106 | } | ||
107 | |||
108 | Component { | ||
109 | id: gmail | ||
110 | |||
111 | CreateGmail { | ||
112 | } | ||
113 | } | ||
114 | |||
115 | Component { | ||
116 | id: imap | ||
117 | |||
118 | CreateImap { | ||
119 | } | ||
120 | } | ||
121 | |||
122 | Component { | ||
123 | id: maildir | ||
124 | |||
125 | CreateMaildir { | ||
126 | } | ||
127 | } | ||
128 | } | ||
diff --git a/components/accounts/contents/ui/CreateGmail.qml b/components/accounts/contents/ui/CreateGmail.qml new file mode 100644 index 00000000..5d7f8194 --- /dev/null +++ b/components/accounts/contents/ui/CreateGmail.qml | |||
@@ -0,0 +1,208 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Controls 2.0 as Controls2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | |||
25 | import org.kube.framework.accounts 1.0 as KubeAccounts | ||
26 | |||
27 | Item { | ||
28 | |||
29 | KubeAccounts.GmailController { | ||
30 | id: account | ||
31 | } | ||
32 | |||
33 | Controls.ToolButton { | ||
34 | iconName: "go-previous" | ||
35 | |||
36 | tooltip: "go back" | ||
37 | |||
38 | onClicked: { | ||
39 | stack.pop() | ||
40 | } | ||
41 | } | ||
42 | |||
43 | //Item to avoid anchors conflict with stack | ||
44 | Item { | ||
45 | |||
46 | anchors { | ||
47 | fill: parent | ||
48 | margins: Kirigami.Units.largeSpacing * 2 | ||
49 | } | ||
50 | |||
51 | Kirigami.Heading { | ||
52 | id: heading | ||
53 | text: "Connect your Gmail account" | ||
54 | |||
55 | color: Kirigami.Theme.highlightColor | ||
56 | } | ||
57 | |||
58 | Kirigami.Label { | ||
59 | id: subHeadline | ||
60 | |||
61 | anchors { | ||
62 | left: heading.left | ||
63 | top: heading.bottom | ||
64 | } | ||
65 | |||
66 | width: parent.width | ||
67 | |||
68 | text: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | ||
69 | |||
70 | color: Kirigami.Theme.disabledTextColor | ||
71 | |||
72 | wrapMode: Text.Wrap | ||
73 | } | ||
74 | |||
75 | GridLayout { | ||
76 | anchors { | ||
77 | top:subHeadline.bottom | ||
78 | bottom: parent.bottom | ||
79 | left: parent.left | ||
80 | right: parent.right | ||
81 | topMargin: Kirigami.Units.largeSpacing * 2 | ||
82 | } | ||
83 | |||
84 | columns: 2 | ||
85 | columnSpacing: Kirigami.Units.largeSpacing | ||
86 | rowSpacing: Kirigami.Units.largeSpacing | ||
87 | |||
88 | Controls.Label { | ||
89 | text: "Title of Account" | ||
90 | Layout.alignment: Qt.AlignRight | ||
91 | } | ||
92 | Controls.TextField { | ||
93 | Layout.fillWidth: true | ||
94 | |||
95 | placeholderText: "E.g. \"Work\", \"Home\" that will be displayed in Kube as name" | ||
96 | |||
97 | text: account.name | ||
98 | |||
99 | onTextChanged: { | ||
100 | account.name = text | ||
101 | } | ||
102 | } | ||
103 | |||
104 | Controls.Label { | ||
105 | text: "Email address" | ||
106 | Layout.alignment: Qt.AlignRight | ||
107 | } | ||
108 | |||
109 | Controls.TextField { | ||
110 | Layout.fillWidth: true | ||
111 | |||
112 | text: account.emailAddress | ||
113 | |||
114 | onTextChanged: { | ||
115 | account.emailAddress = text | ||
116 | } | ||
117 | |||
118 | placeholderText: "Your email address" | ||
119 | } | ||
120 | |||
121 | Controls.Label { | ||
122 | text: "Name" | ||
123 | Layout.alignment: Qt.AlignRight | ||
124 | } | ||
125 | Controls.TextField { | ||
126 | Layout.fillWidth: true | ||
127 | |||
128 | placeholderText: "Your name" | ||
129 | |||
130 | text: account.identityName | ||
131 | |||
132 | onTextChanged: { | ||
133 | account.identityName = text | ||
134 | } | ||
135 | } | ||
136 | |||
137 | Kirigami.Label { | ||
138 | text: "Password" | ||
139 | Layout.alignment: Qt.AlignRight | ||
140 | } | ||
141 | |||
142 | RowLayout { | ||
143 | Layout.fillWidth: true | ||
144 | |||
145 | Controls.TextField { | ||
146 | id: pwField | ||
147 | Layout.fillWidth: true | ||
148 | |||
149 | placeholderText: "Password of your email account" | ||
150 | |||
151 | text: account.password | ||
152 | |||
153 | onTextChanged: { | ||
154 | account.password = text | ||
155 | } | ||
156 | |||
157 | echoMode: TextInput.Password | ||
158 | } | ||
159 | |||
160 | Controls.CheckBox { | ||
161 | text: "Show Password" | ||
162 | onClicked: { | ||
163 | if(pwField.echoMode == TextInput.Password) { | ||
164 | pwField.echoMode = TextInput.Normal; | ||
165 | } else { | ||
166 | pwField.echoMode = TextInput.Password; | ||
167 | } | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | Item { | ||
173 | Layout.fillHeight: true | ||
174 | } | ||
175 | |||
176 | Kirigami.Label { | ||
177 | text: "" | ||
178 | } | ||
179 | |||
180 | Kirigami.Label { | ||
181 | text: "" | ||
182 | } | ||
183 | |||
184 | Item { | ||
185 | Layout.fillWidth: true | ||
186 | |||
187 | Controls.Button { | ||
188 | text: "Discard" | ||
189 | |||
190 | onClicked: { | ||
191 | popup.close() | ||
192 | } | ||
193 | } | ||
194 | |||
195 | Controls.Button { | ||
196 | anchors.right: parent.right | ||
197 | |||
198 | text: "Save" | ||
199 | |||
200 | onClicked: { | ||
201 | account.createAction.execute() | ||
202 | popup.close() | ||
203 | } | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | } | ||
208 | } | ||
diff --git a/components/accounts/contents/ui/CreateImap.qml b/components/accounts/contents/ui/CreateImap.qml new file mode 100644 index 00000000..7f355409 --- /dev/null +++ b/components/accounts/contents/ui/CreateImap.qml | |||
@@ -0,0 +1,165 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Controls 2.0 as Controls2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | |||
25 | Item { | ||
26 | |||
27 | Controls.ToolButton { | ||
28 | iconName: "go-previous" | ||
29 | |||
30 | tooltip: "go back" | ||
31 | |||
32 | onClicked: { | ||
33 | stack.pop() | ||
34 | } | ||
35 | } | ||
36 | |||
37 | //Item to avoid anchors conflict with stack | ||
38 | Item { | ||
39 | |||
40 | anchors { | ||
41 | fill: parent | ||
42 | margins: Kirigami.Units.largeSpacing * 2 | ||
43 | } | ||
44 | |||
45 | Kirigami.Heading { | ||
46 | id: heading | ||
47 | text: "Connect your IMAP account" | ||
48 | |||
49 | color: Kirigami.Theme.highlightColor | ||
50 | } | ||
51 | |||
52 | Kirigami.Label { | ||
53 | id: subHeadline | ||
54 | |||
55 | anchors { | ||
56 | left: heading.left | ||
57 | top: heading.bottom | ||
58 | } | ||
59 | |||
60 | width: parent.width | ||
61 | |||
62 | text: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | ||
63 | |||
64 | color: Kirigami.Theme.disabledTextColor | ||
65 | |||
66 | wrapMode: Text.Wrap | ||
67 | } | ||
68 | |||
69 | GridLayout { | ||
70 | anchors { | ||
71 | top:subHeadline.bottom | ||
72 | bottom: parent.bottom | ||
73 | left: parent.left | ||
74 | right: parent.right | ||
75 | topMargin: Kirigami.Units.largeSpacing * 2 | ||
76 | } | ||
77 | |||
78 | columns: 2 | ||
79 | columnSpacing: Kirigami.Units.largeSpacing | ||
80 | rowSpacing: Kirigami.Units.largeSpacing | ||
81 | |||
82 | Controls.Label { | ||
83 | text: "Title of Account" | ||
84 | Layout.alignment: Qt.AlignRight | ||
85 | } | ||
86 | Controls.TextField { | ||
87 | Layout.fillWidth: true | ||
88 | |||
89 | placeholderText: "E.g. \"Work\", \"Home\" that will be displayed in Kube as name" | ||
90 | } | ||
91 | |||
92 | Controls.Label { | ||
93 | text: "Email address" | ||
94 | Layout.alignment: Qt.AlignRight | ||
95 | } | ||
96 | |||
97 | Controls.TextField { | ||
98 | Layout.fillWidth: true | ||
99 | |||
100 | placeholderText: "Your email address" | ||
101 | } | ||
102 | |||
103 | Kirigami.Label { | ||
104 | text: "Password" | ||
105 | Layout.alignment: Qt.AlignRight | ||
106 | } | ||
107 | |||
108 | RowLayout { | ||
109 | Layout.fillWidth: true | ||
110 | |||
111 | Controls.TextField { | ||
112 | id: pwField | ||
113 | Layout.fillWidth: true | ||
114 | |||
115 | placeholderText: "Password of your email account" | ||
116 | echoMode: TextInput.Password | ||
117 | } | ||
118 | |||
119 | Controls.CheckBox { | ||
120 | text: "Show Password" | ||
121 | onClicked: { | ||
122 | if(pwField.echoMode == TextInput.Password) { | ||
123 | pwField.echoMode = TextInput.Normal; | ||
124 | } else { | ||
125 | pwField.echoMode = TextInput.Password; | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | } | ||
130 | |||
131 | Item { | ||
132 | Layout.fillHeight: true | ||
133 | } | ||
134 | |||
135 | Kirigami.Label { | ||
136 | text: "" | ||
137 | } | ||
138 | |||
139 | Kirigami.Label { | ||
140 | text: "" | ||
141 | } | ||
142 | |||
143 | Item { | ||
144 | Layout.fillWidth: true | ||
145 | |||
146 | Controls.Button { | ||
147 | text: "Discard" | ||
148 | |||
149 | onClicked: { | ||
150 | popup.close() | ||
151 | } | ||
152 | } | ||
153 | |||
154 | Controls.Button { | ||
155 | anchors.right: parent.right | ||
156 | |||
157 | text: "Next" | ||
158 | |||
159 | onClicked: { | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | } | ||
164 | } | ||
165 | } | ||
diff --git a/components/accounts/contents/ui/CreateKolabNow.qml b/components/accounts/contents/ui/CreateKolabNow.qml new file mode 100644 index 00000000..e6022cbb --- /dev/null +++ b/components/accounts/contents/ui/CreateKolabNow.qml | |||
@@ -0,0 +1,208 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Controls 2.0 as Controls2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | |||
25 | import org.kube.framework.accounts 1.0 as KubeAccounts | ||
26 | |||
27 | Item { | ||
28 | |||
29 | KubeAccounts.KolabNowController { | ||
30 | id: account | ||
31 | } | ||
32 | |||
33 | Controls.ToolButton { | ||
34 | iconName: "go-previous" | ||
35 | |||
36 | tooltip: "go back" | ||
37 | |||
38 | onClicked: { | ||
39 | stack.pop() | ||
40 | } | ||
41 | } | ||
42 | |||
43 | //Item to avoid anchors conflict with stack | ||
44 | Item { | ||
45 | |||
46 | anchors { | ||
47 | fill: parent | ||
48 | margins: Kirigami.Units.largeSpacing * 2 | ||
49 | } | ||
50 | |||
51 | Kirigami.Heading { | ||
52 | id: heading | ||
53 | text: "Connect your Kolab Now account" | ||
54 | |||
55 | color: Kirigami.Theme.highlightColor | ||
56 | } | ||
57 | |||
58 | Kirigami.Label { | ||
59 | id: subHeadline | ||
60 | |||
61 | anchors { | ||
62 | left: heading.left | ||
63 | top: heading.bottom | ||
64 | } | ||
65 | |||
66 | width: parent.width | ||
67 | |||
68 | text: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | ||
69 | |||
70 | color: Kirigami.Theme.disabledTextColor | ||
71 | |||
72 | wrapMode: Text.Wrap | ||
73 | } | ||
74 | |||
75 | GridLayout { | ||
76 | anchors { | ||
77 | top:subHeadline.bottom | ||
78 | bottom: parent.bottom | ||
79 | left: parent.left | ||
80 | right: parent.right | ||
81 | topMargin: Kirigami.Units.largeSpacing * 2 | ||
82 | } | ||
83 | |||
84 | columns: 2 | ||
85 | columnSpacing: Kirigami.Units.largeSpacing | ||
86 | rowSpacing: Kirigami.Units.largeSpacing | ||
87 | |||
88 | Controls.Label { | ||
89 | text: "Title of Account" | ||
90 | Layout.alignment: Qt.AlignRight | ||
91 | } | ||
92 | Controls.TextField { | ||
93 | Layout.fillWidth: true | ||
94 | |||
95 | placeholderText: "E.g. \"Work\", \"Home\" that will be displayed in Kube as name" | ||
96 | |||
97 | text: account.name | ||
98 | |||
99 | onTextChanged: { | ||
100 | account.name = text | ||
101 | } | ||
102 | } | ||
103 | |||
104 | Controls.Label { | ||
105 | text: "Name" | ||
106 | Layout.alignment: Qt.AlignRight | ||
107 | } | ||
108 | Controls.TextField { | ||
109 | Layout.fillWidth: true | ||
110 | |||
111 | placeholderText: "Your name" | ||
112 | |||
113 | text: account.identityName | ||
114 | |||
115 | onTextChanged: { | ||
116 | account.identityName = text | ||
117 | } | ||
118 | } | ||
119 | |||
120 | Controls.Label { | ||
121 | text: "Email address" | ||
122 | Layout.alignment: Qt.AlignRight | ||
123 | } | ||
124 | |||
125 | Controls.TextField { | ||
126 | Layout.fillWidth: true | ||
127 | |||
128 | text: account.emailAddress | ||
129 | |||
130 | onTextChanged: { | ||
131 | account.emailAddress = text | ||
132 | } | ||
133 | |||
134 | placeholderText: "Your email address" | ||
135 | } | ||
136 | |||
137 | Kirigami.Label { | ||
138 | text: "Password" | ||
139 | Layout.alignment: Qt.AlignRight | ||
140 | } | ||
141 | |||
142 | RowLayout { | ||
143 | Layout.fillWidth: true | ||
144 | |||
145 | Controls.TextField { | ||
146 | id: pwField | ||
147 | Layout.fillWidth: true | ||
148 | |||
149 | placeholderText: "Password of your email account" | ||
150 | |||
151 | text: account.password | ||
152 | |||
153 | onTextChanged: { | ||
154 | account.password = text | ||
155 | } | ||
156 | |||
157 | echoMode: TextInput.Password | ||
158 | } | ||
159 | |||
160 | Controls.CheckBox { | ||
161 | text: "Show Password" | ||
162 | onClicked: { | ||
163 | if(pwField.echoMode == TextInput.Password) { | ||
164 | pwField.echoMode = TextInput.Normal; | ||
165 | } else { | ||
166 | pwField.echoMode = TextInput.Password; | ||
167 | } | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | Item { | ||
173 | Layout.fillHeight: true | ||
174 | } | ||
175 | |||
176 | Kirigami.Label { | ||
177 | text: "" | ||
178 | } | ||
179 | |||
180 | Kirigami.Label { | ||
181 | text: "" | ||
182 | } | ||
183 | |||
184 | Item { | ||
185 | Layout.fillWidth: true | ||
186 | |||
187 | Controls.Button { | ||
188 | text: "Discard" | ||
189 | |||
190 | onClicked: { | ||
191 | popup.close() | ||
192 | } | ||
193 | } | ||
194 | |||
195 | Controls.Button { | ||
196 | anchors.right: parent.right | ||
197 | |||
198 | text: "Save" | ||
199 | |||
200 | onClicked: { | ||
201 | account.createAction.execute() | ||
202 | popup.close() | ||
203 | } | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | } | ||
208 | } | ||
diff --git a/components/accounts/contents/ui/CreateMaildir.qml b/components/accounts/contents/ui/CreateMaildir.qml new file mode 100644 index 00000000..99bde452 --- /dev/null +++ b/components/accounts/contents/ui/CreateMaildir.qml | |||
@@ -0,0 +1,201 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Controls 2.0 as Controls2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | ||
24 | import QtQuick.Dialogs 1.0 as Dialogs | ||
25 | |||
26 | import org.kube.framework.accounts 1.0 as KubeAccounts | ||
27 | |||
28 | Item { | ||
29 | id: root | ||
30 | |||
31 | //Controller | ||
32 | KubeAccounts.MaildirController { | ||
33 | id: account | ||
34 | } | ||
35 | |||
36 | //Navigation | ||
37 | Controls.ToolButton { | ||
38 | iconName: "go-previous" | ||
39 | |||
40 | tooltip: "go back" | ||
41 | |||
42 | onClicked: { | ||
43 | stack.pop() | ||
44 | } | ||
45 | } | ||
46 | |||
47 | //Item to avoid anchors conflict with stack | ||
48 | Item { | ||
49 | |||
50 | anchors { | ||
51 | fill: parent | ||
52 | margins: Kirigami.Units.largeSpacing * 2 | ||
53 | } | ||
54 | |||
55 | |||
56 | //BEGIN heading | ||
57 | Kirigami.Heading { | ||
58 | id: heading | ||
59 | text: "Add your Maildir archive" | ||
60 | |||
61 | color: Kirigami.Theme.highlightColor | ||
62 | } | ||
63 | |||
64 | Controls2.Label { | ||
65 | id: subHeadline | ||
66 | |||
67 | anchors { | ||
68 | left: heading.left | ||
69 | top: heading.bottom | ||
70 | } | ||
71 | |||
72 | width: parent.width | ||
73 | |||
74 | text: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube" | ||
75 | |||
76 | color: Kirigami.Theme.disabledTextColor | ||
77 | wrapMode: Text.Wrap | ||
78 | } | ||
79 | //END heading | ||
80 | |||
81 | GridLayout { | ||
82 | anchors { | ||
83 | top:subHeadline.bottom | ||
84 | bottom: parent.bottom | ||
85 | left: parent.left | ||
86 | right: parent.right | ||
87 | topMargin: Kirigami.Units.largeSpacing * 2 | ||
88 | } | ||
89 | |||
90 | columns: 2 | ||
91 | columnSpacing: Kirigami.Units.largeSpacing | ||
92 | rowSpacing: Kirigami.Units.largeSpacing | ||
93 | |||
94 | Controls2.Label { | ||
95 | text: "Title of account" | ||
96 | Layout.alignment: Qt.AlignRight | ||
97 | } | ||
98 | Controls.TextField { | ||
99 | id: title | ||
100 | Layout.fillWidth: true | ||
101 | |||
102 | text: account.name | ||
103 | |||
104 | onTextChanged: { | ||
105 | account.name = text | ||
106 | } | ||
107 | } | ||
108 | |||
109 | Controls2.Label { | ||
110 | text: "Path" | ||
111 | Layout.alignment: Qt.AlignRight | ||
112 | } | ||
113 | RowLayout { | ||
114 | Layout.fillWidth: true | ||
115 | |||
116 | Controls.TextField { | ||
117 | id: path | ||
118 | Layout.fillWidth: true | ||
119 | |||
120 | enabled: false | ||
121 | |||
122 | text: account.path | ||
123 | } | ||
124 | |||
125 | Controls.Button { | ||
126 | iconName: "folder" | ||
127 | |||
128 | onClicked: { | ||
129 | fileDialogComponent.createObject(parent) | ||
130 | } | ||
131 | |||
132 | Component { | ||
133 | id: fileDialogComponent | ||
134 | Dialogs.FileDialog { | ||
135 | id: fileDialog | ||
136 | |||
137 | visible: true | ||
138 | title: "Choose the maildir folder" | ||
139 | |||
140 | selectFolder: true | ||
141 | |||
142 | onAccepted: { | ||
143 | account.path = fileDialog.fileUrl | ||
144 | } | ||
145 | } | ||
146 | } | ||
147 | } | ||
148 | } | ||
149 | |||
150 | /* | ||
151 | Controls2.Label { | ||
152 | text: "" | ||
153 | } | ||
154 | Controls.CheckBox { | ||
155 | id: readOnly | ||
156 | text: "Read only" | ||
157 | } | ||
158 | */ | ||
159 | |||
160 | Controls2.Label { | ||
161 | text: "" | ||
162 | Layout.fillHeight: true | ||
163 | } | ||
164 | Controls2.Label { | ||
165 | text: "" | ||
166 | } | ||
167 | |||
168 | Controls2.Label { | ||
169 | text: "" | ||
170 | } | ||
171 | Item { | ||
172 | Layout.fillWidth: true | ||
173 | |||
174 | Controls2.Button { | ||
175 | text: "Discard" | ||
176 | |||
177 | onClicked: { | ||
178 | //account.clear() | ||
179 | popup.close() | ||
180 | } | ||
181 | } | ||
182 | |||
183 | Controls2.Button { | ||
184 | id: saveButton | ||
185 | |||
186 | anchors.right: parent.right | ||
187 | |||
188 | text: "Save" | ||
189 | |||
190 | enabled: account.createAction.enabled | ||
191 | |||
192 | onClicked: { | ||
193 | account.createAction.execute() | ||
194 | popup.close() | ||
195 | } | ||
196 | } | ||
197 | } | ||
198 | } | ||
199 | } | ||
200 | } | ||
201 | |||
diff --git a/components/accounts/contents/ui/EditImap.qml b/components/accounts/contents/ui/EditImap.qml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/components/accounts/contents/ui/EditImap.qml | |||
@@ -0,0 +1 @@ | |||
diff --git a/components/accounts/contents/ui/EditKolabNow.qml b/components/accounts/contents/ui/EditKolabNow.qml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/components/accounts/contents/ui/EditKolabNow.qml | |||
@@ -0,0 +1 @@ | |||
diff --git a/components/accounts/contents/ui/EditMaildir.qml b/components/accounts/contents/ui/EditMaildir.qml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/components/accounts/contents/ui/EditMaildir.qml | |||
@@ -0,0 +1 @@ | |||
diff --git a/components/accounts/contents/ui/main.qml b/components/accounts/contents/ui/main.qml new file mode 100644 index 00000000..e15bca8f --- /dev/null +++ b/components/accounts/contents/ui/main.qml | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Controls 2.0 as Controls2 | ||
21 | |||
22 | Controls2.ApplicationWindow { | ||
23 | id: app | ||
24 | height: 900 | ||
25 | width: 1500 | ||
26 | |||
27 | AccountWizard { | ||
28 | visible: true | ||
29 | } | ||
30 | } | ||