summaryrefslogtreecommitdiffstats
path: root/components/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'components/accounts')
-rw-r--r--components/accounts/AccountWizard.qml118
-rw-r--r--components/accounts/CreateImap.qml165
-rw-r--r--components/accounts/CreateKolabNow.qml165
-rw-r--r--components/accounts/CreateMaildir.qml174
-rw-r--r--components/accounts/EditImap.qml1
-rw-r--r--components/accounts/EditKolabNow.qml1
-rw-r--r--components/accounts/EditMaildir.qml1
-rw-r--r--components/accounts/main.qml29
8 files changed, 654 insertions, 0 deletions
diff --git a/components/accounts/AccountWizard.qml b/components/accounts/AccountWizard.qml
new file mode 100644
index 00000000..44561ab8
--- /dev/null
+++ b/components/accounts/AccountWizard.qml
@@ -0,0 +1,118 @@
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
19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Controls 2.0 as Controls2
23import org.kde.kirigami 1.0 as Kirigami
24
25Controls2.Popup {
26 id: popup
27
28 height: app.height * 0.85
29 width: app.width * 0.85
30
31 x: app.width * 0.075
32 y: 50
33
34 visible: true
35
36 modal: true
37 focus: true
38 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
39
40
41 Controls2.StackView {
42 id: stack
43
44 anchors.fill: parent
45
46 initialItem: mainView
47 }
48
49 Component {
50 id: mainView
51
52 Item {
53
54 ColumnLayout {
55
56 anchors.centerIn: parent
57
58 width: parent.width * 0.4
59
60 spacing: Kirigami.Units.largeSpacing
61
62 Controls.Button {
63
64 Layout.fillWidth: true
65
66 text: "kolabnow account"
67
68 onClicked: {
69 stack.push(kolabnow)
70 }
71 }
72
73 Controls.Button {
74
75 Layout.fillWidth: true
76
77 text: "imap account"
78
79 onClicked: {
80 stack.push(imap)
81 }
82 }
83
84 Controls.Button {
85
86 Layout.fillWidth: true
87
88 text: "maildir archive"
89
90 onClicked: {
91 stack.push(maildir)
92 }
93 }
94 }
95 }
96 }
97
98 Component {
99 id: kolabnow
100
101 CreateKolabNow {
102 }
103 }
104
105 Component {
106 id: imap
107
108 CreateImap {
109 }
110 }
111
112 Component {
113 id: maildir
114
115 CreateMaildir {
116 }
117 }
118}
diff --git a/components/accounts/CreateImap.qml b/components/accounts/CreateImap.qml
new file mode 100644
index 00000000..7f355409
--- /dev/null
+++ b/components/accounts/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
19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Controls 2.0 as Controls2
23import org.kde.kirigami 1.0 as Kirigami
24
25Item {
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/CreateKolabNow.qml b/components/accounts/CreateKolabNow.qml
new file mode 100644
index 00000000..3f23c20e
--- /dev/null
+++ b/components/accounts/CreateKolabNow.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
19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Controls 2.0 as Controls2
23import org.kde.kirigami 1.0 as Kirigami
24
25Item {
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 Kolab Now 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: "Save"
158
159 onClicked: {
160 }
161 }
162 }
163 }
164 }
165}
diff --git a/components/accounts/CreateMaildir.qml b/components/accounts/CreateMaildir.qml
new file mode 100644
index 00000000..63a63221
--- /dev/null
+++ b/components/accounts/CreateMaildir.qml
@@ -0,0 +1,174 @@
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
19import QtQuick 2.7
20import QtQuick.Layouts 1.1
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Controls 2.0 as Controls2
23import org.kde.kirigami 1.0 as Kirigami
24import QtQuick.Dialogs 1.0
25
26Item {
27
28 Controls.ToolButton {
29 iconName: "go-previous"
30
31 tooltip: "go back"
32
33 onClicked: {
34 stack.pop()
35 }
36 }
37
38 //Item to avoid anchors conflict with stack
39 Item {
40
41 anchors {
42 fill: parent
43 margins: Kirigami.Units.largeSpacing * 2
44 }
45
46
47 Kirigami.Heading {
48 id: heading
49 text: "Add your Maildir archive"
50
51 color: Kirigami.Theme.highlightColor
52 }
53
54 Kirigami.Label {
55 id: subHeadline
56
57 anchors {
58 left: heading.left
59 top: heading.bottom
60 }
61
62 width: parent.width
63
64 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"
65
66 color: Kirigami.Theme.disabledTextColor
67 wrapMode: Text.Wrap
68 }
69
70
71 GridLayout {
72 anchors {
73 top:subHeadline.bottom
74 bottom: parent.bottom
75 left: parent.left
76 right: parent.right
77 topMargin: Kirigami.Units.largeSpacing * 2
78 }
79
80 columns: 2
81 columnSpacing: Kirigami.Units.largeSpacing
82 rowSpacing: Kirigami.Units.largeSpacing
83
84 Kirigami.Label {
85 text: "Title of account"
86 Layout.alignment: Qt.AlignRight
87 }
88 Controls.TextField {
89 Layout.fillWidth: true
90 }
91
92 Kirigami.Label {
93 text: "Path"
94 Layout.alignment: Qt.AlignRight
95 }
96 RowLayout {
97 Layout.fillWidth: true
98
99 Controls.TextField {
100 id: path
101 Layout.fillWidth: true
102
103 enabled: false
104 }
105
106 Controls.Button {
107 iconName: "folder"
108
109 onClicked: {
110 fileDialogComponent.createObject(parent)
111 }
112
113 Component {
114 id: fileDialogComponent
115 FileDialog {
116 id: fileDialog
117
118 visible: true
119 title: "Choose the maildir folder"
120
121 selectFolder: true
122
123 onAccepted: {
124 path.text = fileDialog.fileUrl
125 }
126 }
127 }
128 }
129 }
130
131 Kirigami.Label {
132 text: ""
133 }
134 Controls.CheckBox {
135 text: "Read only"
136 }
137
138 Kirigami.Label {
139 text: ""
140 Layout.fillHeight: true
141 }
142 Kirigami.Label {
143 text: ""
144 }
145
146 Kirigami.Label {
147 text: ""
148 }
149 Item {
150 Layout.fillWidth: true
151
152 Controls.Button {
153 text: "Discard"
154
155 onClicked: {
156 popup.close()
157 }
158 }
159
160 Controls.Button {
161 id: saveButton
162
163 anchors.right: parent.right
164
165 text: "Save"
166
167 onClicked: {
168 }
169 }
170 }
171 }
172 }
173}
174
diff --git a/components/accounts/EditImap.qml b/components/accounts/EditImap.qml
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/components/accounts/EditImap.qml
@@ -0,0 +1 @@
diff --git a/components/accounts/EditKolabNow.qml b/components/accounts/EditKolabNow.qml
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/components/accounts/EditKolabNow.qml
@@ -0,0 +1 @@
diff --git a/components/accounts/EditMaildir.qml b/components/accounts/EditMaildir.qml
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/components/accounts/EditMaildir.qml
@@ -0,0 +1 @@
diff --git a/components/accounts/main.qml b/components/accounts/main.qml
new file mode 100644
index 00000000..6b9fc86c
--- /dev/null
+++ b/components/accounts/main.qml
@@ -0,0 +1,29 @@
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
19import QtQuick 2.7
20import QtQuick.Controls 2.0 as Controls2
21
22Controls2.ApplicationWindow {
23 id: app
24 height: 900
25 width: 1500
26
27 AccountWizard {
28 }
29}