summaryrefslogtreecommitdiffstats
path: root/components/mail/contents
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-06-15 11:56:55 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-06-15 11:56:55 +0200
commit1949e99b01b223998d40a0bb5ff2ac4b9177bea4 (patch)
tree4c77de8313e5a0d8be5bbb3d16001e723c9318a9 /components/mail/contents
parentdd2fe4eae20a0771c047f4ca8cb590f8c3808f0b (diff)
downloadkube-1949e99b01b223998d40a0bb5ff2ac4b9177bea4.tar.gz
kube-1949e99b01b223998d40a0bb5ff2ac4b9177bea4.zip
initial account switcher
Diffstat (limited to 'components/mail/contents')
-rw-r--r--components/mail/contents/ui/main.qml122
1 files changed, 104 insertions, 18 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index eb890e9b..7b318991 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -22,6 +22,7 @@ import org.kde.kirigami 1.0 as Kirigami
22 22
23import org.kube.framework.actions 1.0 as KubeAction 23import org.kube.framework.actions 1.0 as KubeAction
24import org.kube.framework.settings 1.0 as KubeSettings 24import org.kube.framework.settings 1.0 as KubeSettings
25import org.kube.framework.domain 1.0 as KubeFramework
25import org.kube.framework.theme 1.0 26import org.kube.framework.theme 1.0
26import org.kube.components 1.0 as KubeComponents 27import org.kube.components 1.0 as KubeComponents
27 28
@@ -138,20 +139,105 @@ ApplicationWindow {
138 height: parent.height 139 height: parent.height
139 width: folderListView.width - 5 //to adjust for the toolbar spacing 140 width: folderListView.width - 5 //to adjust for the toolbar spacing
140 141
141 KubeComponents.AccountSwitcher { 142 Button {
142 Layout.fillHeight: true 143 id: accountSwitcher
144
143 Layout.fillWidth: true 145 Layout.fillWidth: true
144 } 146 Layout.fillHeight: true
145 147
146 ToolButton { 148 text: "Account Switcher"
147 iconName: "view-refresh" 149
148 text: "Sync" 150 Rectangle {
149 enabled: syncAction.ready 151 anchors {
152 top: parent.bottom
153 left: parent.left
154 }
155
156 height: 300
157 width: 600
158
159 color: "lightgrey" //FIXME create a propper dialog thingy
160
161 clip: true
162
163 ListView {
164 id: listView
165
166 anchors.fill: parent
167
168 footer: Button {
169 text: "Create new Account"
170 }
171
172 model: KubeFramework.AccountsModel { }
173
174 delegate: Kirigami.AbstractListItem {
175 enabled: true
176 supportsMouseEvents: true
177
178 contentItem: Item {
179 height: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 1
180 width: listView.width
181
182 RowLayout {
183 anchors {
184 left: parent.left
185 margins: Kirigami.Units.smallSpacing
186 }
187
188 Layout.fillHeight: true
189
190
191 KubeFramework.AccountFactory {
192 id: accountFactory
193 accountId: model.accountId
194 }
195
196 Kirigami.Icon {
197 source: accountFactory.icon
198 }
199
200 Label {
201 text: model.name === "" ? accountFactory.name : model.name
202 }
203
204
205 }
206 Button {
207
208 anchors {
209 right: parent.right
210 margins: Kirigami.Units.largeSpacing
211 }
212
213
214 text: "edit"
215 }
216 }
217 }
218 }
150 219
151 onClicked: {
152 syncAction.execute()
153 } 220 }
221
154 } 222 }
223
224 /*
225 * KubeComponents.AccountSwitcher {
226 * Layout.fillHeight: true
227 * Layout.fillWidth: true
228 }
229
230
231 ToolButton {
232 iconName: "view-refresh"
233 text: "Sync"
234 enabled: syncAction.ready
235
236 onClicked: {
237 syncAction.execute()
238 }
239 }
240 */
155 } 241 }
156 //END Folderlist section 242 //END Folderlist section
157 243
@@ -253,15 +339,15 @@ ApplicationWindow {
253 } 339 }
254 340
255 /* 341 /*
256 ToolButton { 342 * ToolButton {
257 iconName: "mail-message-edit" 343 * iconName: "mail-message-edit"
258 text: "Edit" 344 * text: "Edit"
259 enabled: editAction.ready 345 * enabled: editAction.ready
260 onClicked: { 346 * onClicked: {
261 editAction.execute() 347 * editAction.execute()
262 } 348 }
263 } 349 }
264 */ 350 */
265 351
266 Item { 352 Item {
267 Layout.fillWidth: true 353 Layout.fillWidth: true