summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/mail/contents/ui/main.qml187
-rw-r--r--components/package/contents/ui/AccountSwitcher.qml102
-rw-r--r--components/package/contents/ui/FolderListView.qml19
-rw-r--r--components/package/contents/ui/MailListView.qml199
-rw-r--r--components/package/contents/ui/People.qml133
-rw-r--r--components/package/contents/ui/SingleMailView.qml4
-rw-r--r--components/qmldir2
-rw-r--r--framework/accounts/kolabnowcontroller.cpp2
8 files changed, 491 insertions, 157 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index 20fa25c1..8ee1c794 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -1,20 +1,20 @@
1/* 1/*
2 Copyright (C) 2015 Michael Bohlender, <michael.bohlender@kdemail.net> 2 * Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net>
3 3 *
4 This program is free software; you can redistribute it and/or modify 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 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 6 * the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version. 7 * (at your option) any later version.
8 8 *
9 This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 * GNU General Public License for more details.
13 13 *
14 You should have received a copy of the GNU General Public License along 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., 15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/ 17 */
18 18
19 19
20import QtQuick 2.7 20import QtQuick 2.7
@@ -35,8 +35,8 @@ Controls2.ApplicationWindow {
35 35
36 //FIXME remove fixed pixel hight 36 //FIXME remove fixed pixel hight
37 //for now just convinience during testing 37 //for now just convinience during testing
38 height: 1080 * 0.7 38 height: 1080 * 0.8
39 width: 1920 * 0.7 39 width: 1920 * 0.8
40 40
41 visible: true 41 visible: true
42 42
@@ -92,7 +92,6 @@ Controls2.ApplicationWindow {
92 folder: folderListView.currentFolder 92 folder: folderListView.currentFolder
93 } 93 }
94 94
95
96 //BEGIN Shortcuts 95 //BEGIN Shortcuts
97 Shortcut { 96 Shortcut {
98 sequence: StandardKey.Refresh 97 sequence: StandardKey.Refresh
@@ -139,24 +138,103 @@ Controls2.ApplicationWindow {
139 138
140 color: Kirigami.Theme.textColor 139 color: Kirigami.Theme.textColor
141 140
142 Controls2.Button { 141 Controls2.ToolBar {
143 id: newMailButton 142 id: toolBar
144 143
145 anchors { 144 anchors {
146 top: parent.top 145 top: parent.top
147 left: parent.left 146 left: parent.left
148 right: parent.right 147 right: parent.right
149 margins: Kirigami.Units.smallSpacing
150 } 148 }
151 149
150 RowLayout {
151 anchors.centerIn: parent
152
153 spacing: Kirigami.Units.largeSpacing
154
155 KubeComponents.AccountSwitcher {
156 id: accountSwitcher
157
158 iconName: "kdenlive-menu"
159 height: Kirigami.Units.gridUnit * 1.5
160 width: height
161 }
162
163 ToolButton {
164 iconName: "user"
165 height: Kirigami.Units.gridUnit * 1.5
166 width: height
167
168 onClicked: {
169 people.open()
170 }
171 }
172
173 ToolButton {
174 iconName: "search"
175 height: Kirigami.Units.gridUnit * 1.5
176 width: height
177
178 onClicked: {
179 search.open()
180 }
181 }
182 }
183 }
184
185 Rectangle {
186 id: newMailButton
187
188 anchors {
189 top: toolBar.bottom
190 left: parent.left
191 right: parent.right
192 margins: Kirigami.Units.largeSpacing
193 }
194
195 color: "#27ae60"
196 clip: true
197
152 height: Kirigami.Units.gridUnit * 1.5 198 height: Kirigami.Units.gridUnit * 1.5
153 199
154 text: " " + qsTr("New Email") + " " 200 Text {
201 anchors.centerIn: parent
202
203 text: qsTr("New Email")
204 color: "white"
205 }
155 //iconName: "mail-message-new" 206 //iconName: "mail-message-new"
156 //Controls2.Tooltip.text: "compose new email" 207 //Controls2.Tooltip.text: "compose new email"
157 208
158 onClicked: { 209 MouseArea {
159 composer.open() 210 anchors.fill: parent
211 onClicked: {
212 composer.open()
213 }
214 }
215 }
216
217 Item {
218 id: accountName
219
220 anchors {
221 top: newMailButton.bottom
222 topMargin: Kirigami.Units.smallSpacing
223 }
224
225 width: parent.width
226 height: Kirigami.Units.gridUnit * 2
227
228 Text {
229 anchors {
230 bottom: parent.bottom
231 left: parent.left
232 leftMargin: Kirigami.Units.smallSpacing
233 }
234
235 text: accountSwitcher.accountName
236 font.weight: Font.DemiBold
237 color: "white"
160 } 238 }
161 } 239 }
162 240
@@ -164,24 +242,16 @@ Controls2.ApplicationWindow {
164 id: folderListView 242 id: folderListView
165 243
166 anchors { 244 anchors {
167 top: newMailButton.bottom 245 top: accountName.bottom
168 bottom: accountSwitcher.top 246 topMargin: Kirigami.Units.smallSpacing
247 bottom: parent.bottom
169 left: parent.left 248 left: parent.left
170 right: parent.right 249 right: parent.right
171 topMargin: Kirigami.Units.smallSpacing
172 } 250 }
173 251
174 focus: true 252 focus: true
175 accountId: accountSwitcher.accountId 253 accountId: accountSwitcher.accountId
176 } 254 }
177 KubeComponents.AccountSwitcher {
178 id: accountSwitcher
179
180 anchors.bottom: parent.bottom
181
182 width: parent.width
183 height: Kirigami.Units.gridUnit * 2
184 }
185 } 255 }
186 256
187 KubeComponents.MailListView { 257 KubeComponents.MailListView {
@@ -225,4 +295,49 @@ Controls2.ApplicationWindow {
225 y: app.height * 0.075 295 y: app.height * 0.075
226 } 296 }
227 //END AccountWizard 297 //END AccountWizard
298
299 //BEGIN Search
300 Controls2.Popup {
301 id: search
302
303 width: app.width * 0.6
304 height: Kirigami.Units.gridUnit * 3
305
306 x: app.width * 0.2
307 y: app.height * 0.2
308
309 modal: true
310 focus: true
311
312 RowLayout {
313 anchors.fill: parent
314
315 Controls2.TextField {
316 Layout.fillWidth: true
317 placeholderText: "Search... is not available in this beta"
318 }
319
320 Controls2.Button {
321 text: "Go"
322
323 onClicked: {
324 search.close()
325 }
326 }
327 }
328 }
329 //END Search
330
331 //BEGIN People
332 KubeComponents.People {
333 id: people
334
335 height: app.height * 0.85
336 width: app.width * 0.85
337
338 x: app.width * 0.075
339 y: app.height * 0.075
340
341 }
342 //END People
228} 343}
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml
index 6d1c0aa2..eb5702e0 100644
--- a/components/package/contents/ui/AccountSwitcher.qml
+++ b/components/package/contents/ui/AccountSwitcher.qml
@@ -1,20 +1,20 @@
1/* 1/*
2 Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> 2 * Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net>
3 3 *
4 This program is free software; you can redistribute it and/or modify 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 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 6 * the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version. 7 * (at your option) any later version.
8 8 *
9 This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 * GNU General Public License for more details.
13 13 *
14 You should have received a copy of the GNU General Public License along 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., 15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/ 17 */
18 18
19import QtQuick 2.4 19import QtQuick 2.4
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
@@ -29,74 +29,78 @@ import org.kube.framework.domain 1.0 as KubeFramework
29import org.kube.framework.accounts 1.0 as KubeAccounts 29import org.kube.framework.accounts 1.0 as KubeAccounts
30import org.kube.components 1.0 as KubeComponents 30import org.kube.components 1.0 as KubeComponents
31 31
32Controls2.Button { 32Controls.ToolButton {
33 id: accountSwitcher 33 id: accountSwitcher
34 34
35 property variant accountId 35 property variant accountId
36 property variant accountName
37
38 width: parent.width
36 39
37 KubeFramework.FolderController { 40 KubeFramework.FolderController {
38 id: folderController 41 id: folderController
39 } 42 }
40 43
41 text: "Accounts" 44 KubeAccounts.AccountsModel {
45 id: accountsModel
46 }
47
42 48
43 onClicked: { 49 onClicked: {
44 popup.open() 50 popup.open()
45 focus = false
46 } 51 }
47 52
48 Controls2.Popup { 53 Controls2.Popup {
49 id: popup 54 id: popup
50 55
51 height: 300 56 height: listView.count == 0 ? Kirigami.Units.gridUnit * 4 : Kirigami.Units.gridUnit * 2 + listView.count * Kirigami.Units.gridUnit * 3
52 width: 600 57 width: Kirigami.Units.gridUnit * 20
53 58
54 x: 0 59 y: accountSwitcher.height
55 y: - popup.height
56 60
57 modal: true 61 modal: true
58 focus: true 62 focus: true
59 closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent 63 closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent
60 64
61 Item { 65 Item {
62 id: footer 66 id: buttons
63
64 anchors { 67 anchors {
65 bottom: parent.bottom 68 bottom: parent.bottom
66 left: parent.left
67 right: parent.right
68 margins: Kirigami.Units.largeSpacing
69 } 69 }
70 70
71 height: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 1 71 height: Kirigami.Units.gridUnit * 2
72 width: listView.width 72 width: parent.width
73 73
74 Controls2.Button { 74 Controls2.Button {
75 75
76
76 anchors { 77 anchors {
77 verticalCenter: parent.verticalCenter 78 left: parent.left
78 right: parent.right 79 bottom: parent.bottom
79 } 80 }
80 81
81 text: "Create new Account"
82 82
83 //iconName: "view-refresh"
84 text: "Sync"
85 enabled: folderController.synchronizeAction.enabled
83 onClicked: { 86 onClicked: {
84 accountWizard.open() 87 folderController.synchronizeAction.execute()
85 popup.close() 88 popup.close()
86 } 89 }
87 } 90 }
88 91
89 Controls2.Button { 92 Controls2.Button {
93 id: newAccountButton
94
90 anchors { 95 anchors {
91 verticalCenter: parent.verticalCenter 96 right: parent.right
92 left: parent.left 97 bottom: parent.bottom
93 } 98 }
94 99
95 //iconName: "view-refresh" 100 text: "Create new Account"
96 text: "Sync" 101
97 enabled: folderController.synchronizeAction.enabled
98 onClicked: { 102 onClicked: {
99 folderController.synchronizeAction.execute() 103 accountWizard.open()
100 popup.close() 104 popup.close()
101 } 105 }
102 } 106 }
@@ -107,15 +111,14 @@ Controls2.Button {
107 111
108 anchors { 112 anchors {
109 top: parent.top 113 top: parent.top
110 bottom: footer.top 114 bottom: buttons.top
111 left: parent.left 115 left: parent.left
112 right: parent.right 116 right: parent.right
113 margins: Kirigami.Units.smallSpacing
114 } 117 }
115 118
116 clip: true 119 clip: true
117 120
118 model: KubeAccounts.AccountsModel { } 121 model: accountsModel
119 122
120 delegate: Kirigami.AbstractListItem { 123 delegate: Kirigami.AbstractListItem {
121 id: accountDelegate 124 id: accountDelegate
@@ -141,6 +144,13 @@ Controls2.Button {
141 value: model.accountId 144 value: model.accountId
142 } 145 }
143 146
147 QtQml.Binding {
148 target: accountSwitcher
149 property: "accountName"
150 when: listView.currentIndex == index
151 value: model.name
152 }
153
144 RowLayout { 154 RowLayout {
145 anchors { 155 anchors {
146 verticalCenter: parent.verticalCenter 156 verticalCenter: parent.verticalCenter
@@ -155,9 +165,9 @@ Controls2.Button {
155 accountId: model.accountId 165 accountId: model.accountId
156 } 166 }
157 167
158// Kirigami.Icon { 168 // Kirigami.Icon {
159// source: model.icon 169 // source: model.icon
160// } 170 // }
161 171
162 Controls2.Label { 172 Controls2.Label {
163 text: model.name 173 text: model.name
diff --git a/components/package/contents/ui/FolderListView.qml b/components/package/contents/ui/FolderListView.qml
index e8600832..e7db2905 100644
--- a/components/package/contents/ui/FolderListView.qml
+++ b/components/package/contents/ui/FolderListView.qml
@@ -96,11 +96,15 @@ Rectangle {
96 rowDelegate: Rectangle { 96 rowDelegate: Rectangle {
97 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor 97 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
98 98
99 height: Kirigami.Units.gridUnit * 2 99 height: Kirigami.Units.gridUnit * 1.5
100 width: 20 100 width: 20
101 101
102 } 102 }
103 103
104 frame: Rectangle {
105 color: Kirigami.Theme.textColor
106 }
107
104 branchDelegate: Item { 108 branchDelegate: Item {
105 109
106 width: 16; height: 16 110 width: 16; height: 16
@@ -120,6 +124,19 @@ Rectangle {
120 124
121 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor 125 color: styleData.selected ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
122 126
127 DropArea {
128 anchors.fill: parent
129
130 Rectangle {
131 anchors.fill: parent
132 color: Kirigami.Theme.viewBackgroundColor
133
134 opacity: 0.3
135
136 visible: parent.containsDrag
137 }
138 }
139
123 Text { 140 Text {
124 anchors { 141 anchors {
125 verticalCenter: parent.verticalCenter 142 verticalCenter: parent.verticalCenter
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml
index 68db1c43..6ec86aee 100644
--- a/components/package/contents/ui/MailListView.qml
+++ b/components/package/contents/ui/MailListView.qml
@@ -89,7 +89,7 @@ Item {
89 } 89 }
90 } 90 }
91 91
92 ListView { 92 ListView {
93 id: listView 93 id: listView
94 94
95 anchors.top: toolbar.bottom 95 anchors.top: toolbar.bottom
@@ -119,106 +119,161 @@ Item {
119 parentFolder: root.parentFolder 119 parentFolder: root.parentFolder
120 } 120 }
121 121
122 delegate: Kirigami.AbstractListItem { 122 delegate: Item {
123 id: mailListDelegate 123 id: origin
124 124
125 width: scrollbar.visible ? listView.width - scrollbar.width : listView.width 125 width: delegateRoot.width
126 height: Kirigami.Units.gridUnit * 4.5 126 height: delegateRoot.height
127 127
128 enabled: true 128 QtQml.Binding {
129 supportsMouseEvents: true 129 target: root
130 130 property: "currentMail"
131 checked: listView.currentIndex == index 131 when: listView.currentIndex == index
132 onClicked: { 132 value: model.domainObject
133 listView.currentIndex = model.index 133 }
134 QtQml.Binding {
135 target: root
136 property: "isDraft"
137 when: listView.currentIndex == index
138 value: model.draft
134 } 139 }
135 140
136 //Content
137 Item { 141 Item {
138 width: parent.width 142 id: delegateRoot
139 height: parent.height 143
140 144 width: scrollbar.visible ? listView.width - scrollbar.width : listView.width
141 QtQml.Binding { 145 height: Kirigami.Units.gridUnit * 5
142 target: root 146
143 property: "currentMail" 147 states: [
144 when: listView.currentIndex == index 148 State {
145 value: model.domainObject 149 name: "dnd"
146 } 150 when: mouseArea.drag.active
147 QtQml.Binding { 151
148 target: root 152 PropertyChanges {target: mouseArea; cursorShape: Qt.ClosedHandCursor}
149 property: "isDraft" 153 PropertyChanges {target: delegateRoot; x: x; y:y}
150 when: listView.currentIndex == index 154 PropertyChanges {target: delegateRoot; parent: root}
151 value: model.draft 155
156 PropertyChanges {target: delegateRoot; opacity: 0.7}
157 PropertyChanges {target: background; color: Kirigami.Theme.highlightColor}
158 PropertyChanges {target: subject; color: Kirigami.Theme.highlightedTextColor}
159 PropertyChanges {target: sender; color: Kirigami.Theme.highlightedTextColor}
160 PropertyChanges {target: date; color: Kirigami.Theme.highlightedTextColor}
161 PropertyChanges {target: threadCounter; color: Kirigami.Theme.highlightedTextColor}
162 },
163 State {
164 name: "selected"
165 when: listView.currentIndex == index && !mouseArea.drag.active
166
167 PropertyChanges {target: background; color: Kirigami.Theme.highlightColor}
168 PropertyChanges {target: subject; color: Kirigami.Theme.highlightedTextColor}
169 PropertyChanges {target: sender; color: Kirigami.Theme.highlightedTextColor}
170 PropertyChanges {target: date; color: Kirigami.Theme.highlightedTextColor}
171 PropertyChanges {target: threadCounter; color: Kirigami.Theme.highlightedTextColor}
172 },
173 State {
174 name: "hovered"
175 when: mouseArea.containsMouse && !mouseArea.drag.active
176
177 PropertyChanges {target: background; color: Kirigami.Theme.buttonHoverColor; opacity: 0.7}
178 PropertyChanges {target: subject; color: Kirigami.Theme.highlightedTextColor}
179 PropertyChanges {target: sender; color: Kirigami.Theme.highlightedTextColor}
180 PropertyChanges {target: date; color: Kirigami.Theme.highlightedTextColor}
181 PropertyChanges {target: threadCounter; color: Kirigami.Theme.highlightedTextColor}
152 } 182 }
183 ]
153 184
154 //TODO implement bulk action 185 Drag.active: mouseArea.drag.active
155 // Controls.CheckBox { 186 Drag.hotSpot.x: Kirigami.Units.gridUnit * 2
156 // visible: mailListDelegate.containsMouse == true 187 Drag.hotSpot.y: height / 2
157 // }
158 188
159 Column { 189 MouseArea {
160 anchors { 190 id: mouseArea
161 verticalCenter: parent.verticalCenter
162 left: parent.left
163 leftMargin: Kirigami.Units.largeSpacing
164 }
165 191
166 Text{ 192 anchors.fill: parent
167 text: model.subject
168 color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor
169 193
170 maximumLineCount: 2 194 hoverEnabled: true
171 width: mailListDelegate.width - Kirigami.Units.gridUnit * 3 195 drag.target: parent
172 wrapMode: Text.WrapAnywhere
173 elide: Text.ElideRight
174 }
175 196
176 Text { 197 onClicked: {
177 text: model.senderName 198 listView.currentIndex = index
178 font.italic: true
179 color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
180 width: mailListDelegate.width - Kirigami.Units.gridUnit * 3
181 elide: Text.ElideRight
182 } 199 }
183 } 200 }
184 201
185 Text { 202 Rectangle {
186 anchors { 203 id: background
187 right: parent.right 204
188 bottom: parent.bottom 205 anchors.fill: parent
189 } 206
190 text: Qt.formatDateTime(model.date, "dd MMM yyyy") 207 color: Kirigami.Theme.viewBackgroundColor
191 font.italic: true
192 color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.disabledTextColor
193 font.pointSize: 9
194 }
195 208
209 border.color: Kirigami.Theme.backgroundColor
210 border.width: 1
211 }
196 212
197 Item { 213 Item {
214 id: content
215
198 anchors { 216 anchors {
217 top: parent.top
218 bottom: parent.bottom
219 left: parent.left
199 right: parent.right 220 right: parent.right
221 margins: Kirigami.Units.smallSpacing
200 } 222 }
201 223
202 height: Kirigami.Units.gridUnit * 1.2 224 Column {
203 width: height 225 anchors {
204 226 verticalCenter: parent.verticalCenter
205 visible: !mailListDelegate.checked 227 left: parent.left
228 leftMargin: Kirigami.Units.largeSpacing
229 }
230
231 Text{
232 id: subject
233
234 text: model.subject
235 color: model.unread ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
236
237 maximumLineCount: 2
238 width: content.width - Kirigami.Units.gridUnit * 3
239 wrapMode: Text.WrapAnywhere
240 elide: Text.ElideRight
241 }
242
243 Text {
244 id: sender
245
246 text: model.senderName
247 font.italic: true
248 color: Kirigami.Theme.textColor
249 width: delegateRoot.width - Kirigami.Units.gridUnit * 3
250 elide: Text.ElideRight
251 }
252 }
206 253
207 Rectangle { 254 Text {
208 anchors.fill: parent 255 id: date
209 256
210 opacity: model.unread ? 1 : 0.5 257 anchors {
211 radius: 80 258 right: parent.right
212 color: model.unread ? Kirigami.Theme.highlightColor : Kirigami.Theme.disabledTextColor 259 bottom: parent.bottom
260 }
261 text: Qt.formatDateTime(model.date, "dd MMM yyyy")
262 font.italic: true
263 color: Kirigami.Theme.disabledTextColor
264 font.pointSize: 9
213 } 265 }
214 266
215 Text { 267 Text {
216 anchors.centerIn: parent 268 id: threadCounter
217 269
270 anchors {
271 right: parent.right
272 }
218 text: model.threadSize 273 text: model.threadSize
219 color: Kirigami.Theme.highlightedTextColor 274 color: model.unread ? Kirigami.Theme.highlightColor : Kirigami.Theme.disabledTextColor
275 visible: model.threadSize > 1
220 } 276 }
221
222 } 277 }
223 } 278 }
224 } 279 }
diff --git a/components/package/contents/ui/People.qml b/components/package/contents/ui/People.qml
new file mode 100644
index 00000000..47dd82ec
--- /dev/null
+++ b/components/package/contents/ui/People.qml
@@ -0,0 +1,133 @@
1 /*
2 Copyright (C) 2017 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
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Layouts 1.1
23
24import org.kde.kirigami 1.0 as Kirigami
25
26Popup {
27
28 modal: true
29
30 Controls.SplitView {
31 anchors.fill: parent
32
33 Item {
34 height: parent.height
35 width: Kirigami.Units.gridUnit * 14
36
37 Item {
38 id: toolBar
39
40 width: parent.width - scroll.width
41 height: Kirigami.Units.gridUnit * 2
42
43 Rectangle {
44
45 anchors.centerIn: parent
46
47 height: Kirigami.Units.gridUnit * 1.5
48 width: parent.width* 0.8
49
50 color: "#27ae60"
51
52 clip: true
53
54 Text {
55
56 anchors.centerIn: parent
57
58 clip: true
59
60 text: "New Contact"
61
62 color: "white"
63 }
64 }
65 }
66
67 ListView {
68 id: listView
69
70 anchors {
71 top: toolBar.bottom
72 left: parent.left
73 right: parent.right
74 bottom: parent.bottom
75 topMargin: Kirigami.Units.smallSpacing
76 }
77
78 model: 15
79 clip: true
80
81 ScrollBar.vertical: ScrollBar {
82 id: scroll
83 }
84
85 delegate: Kirigami.AbstractListItem {
86 height: Kirigami.Units.gridUnit * 2.5
87 width: listView.width - scroll.width
88
89 clip: true
90
91 Avatar {
92 id: avatar
93
94 anchors {
95 verticalCenter: parent.verticalCenter
96 left: parent.left
97 leftMargin: Kirigami.Units.smallSpacing
98 }
99
100 height: parent.height * 0.9
101 width: height
102
103 name: "Wolfgang Rosenzweig"
104 }
105
106 Text {
107 id: name
108
109 anchors {
110 left: avatar.right
111 leftMargin: Kirigami.Units.smallSpacing
112 verticalCenter: avatar.verticalCenter
113 }
114
115 text: "Wolfgang Rosenzweig"
116 color: Kirigami.Theme.textColor
117 }
118 }
119 }
120 }
121
122 Item {
123 height: parent.height
124 Layout.fillWidth: true
125
126 ToolBar {
127
128 width: parent.width
129 height: Kirigami.Units.gridUnit * 2
130 }
131 }
132 }
133}
diff --git a/components/package/contents/ui/SingleMailView.qml b/components/package/contents/ui/SingleMailView.qml
index 6baeaed2..ab203ef5 100644
--- a/components/package/contents/ui/SingleMailView.qml
+++ b/components/package/contents/ui/SingleMailView.qml
@@ -27,11 +27,13 @@ import QtQml 2.2 as QtQml
27import org.kube.framework.domain 1.0 as KubeFramework 27import org.kube.framework.domain 1.0 as KubeFramework
28import org.kube.framework.actions 1.0 as KubeAction 28import org.kube.framework.actions 1.0 as KubeAction
29 29
30Item { 30Rectangle {
31 id: root 31 id: root
32 32
33 property variant mail; 33 property variant mail;
34 34
35 color: Kirigami.Theme.backgroundColor
36
35 ListView { 37 ListView {
36 id: listView 38 id: listView
37 anchors { 39 anchors {
diff --git a/components/qmldir b/components/qmldir
index 5cc6f80e..84015b1e 100644
--- a/components/qmldir
+++ b/components/qmldir
@@ -1,5 +1,6 @@
1module org.kube.components 1module org.kube.components
2 2
3Avatar 1.0 Avatar.qml
3FocusComposer 1.0 FocusComposer.qml 4FocusComposer 1.0 FocusComposer.qml
4SingleMailView 1.0 SingleMailView.qml 5SingleMailView 1.0 SingleMailView.qml
5FolderListView 1.0 FolderListView.qml 6FolderListView 1.0 FolderListView.qml
@@ -9,3 +10,4 @@ NewAccountDialog 1.0 NewAccountDialog.qml
9EditAccountDialog 1.0 EditAccountDialog.qml 10EditAccountDialog 1.0 EditAccountDialog.qml
10OverlayDialog 1.0 OverlayDialog.qml 11OverlayDialog 1.0 OverlayDialog.qml
11Outbox 1.0 Outbox.qml 12Outbox 1.0 Outbox.qml
13People 1.0 People.qml
diff --git a/framework/accounts/kolabnowcontroller.cpp b/framework/accounts/kolabnowcontroller.cpp
index 5968dc26..05577754 100644
--- a/framework/accounts/kolabnowcontroller.cpp
+++ b/framework/accounts/kolabnowcontroller.cpp
@@ -43,7 +43,7 @@ void KolabNowController::create() {
43 auto resource = ApplicationDomainType::createEntity<SinkResource>(); 43 auto resource = ApplicationDomainType::createEntity<SinkResource>();
44 resource.setResourceType("sink.imap"); 44 resource.setResourceType("sink.imap");
45 resource.setAccount(account); 45 resource.setAccount(account);
46 resource.setProperty("server","imaps://imap.kolabnow.com:993"); 46 resource.setProperty("server","imaps://beta.kolabnow.com:993");
47 resource.setProperty("username", getEmailAddress()); 47 resource.setProperty("username", getEmailAddress());
48 resource.setProperty("password", getPassword()); 48 resource.setProperty("password", getPassword());
49 Store::create(resource).exec().waitForFinished(); 49 Store::create(resource).exec().waitForFinished();