summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/ExtensionPoint.qml37
-rw-r--r--framework/qml/MailViewer.qml11
2 files changed, 46 insertions, 2 deletions
diff --git a/framework/qml/ExtensionPoint.qml b/framework/qml/ExtensionPoint.qml
new file mode 100644
index 00000000..4f66b20e
--- /dev/null
+++ b/framework/qml/ExtensionPoint.qml
@@ -0,0 +1,37 @@
1/*
2 * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
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
20
21import org.kube.framework 1.0 as Kube
22
23Repeater {
24 id: root
25 property alias extensionPoint: extensionModel.extensionPoint
26 property variant context: {}
27
28 model: Kube.ExtensionModel {
29 id: extensionModel
30 }
31 Loader {
32 source: root.model.findSource(model.name, "main.qml")
33 onLoaded: {
34 item.context = root.context
35 }
36 }
37}
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index 2a1af3a6..e9759d72 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -348,6 +348,8 @@ Rectangle {
348 } 348 }
349 Item { 349 Item {
350 id: footer 350 id: footer
351 property var mail: model.mail
352 property string subject: model.subject
351 353
352 anchors.bottom: parent.bottom 354 anchors.bottom: parent.bottom
353 355
@@ -373,13 +375,12 @@ Rectangle {
373 } 375 }
374 } 376 }
375 377
376 Grid { 378 Row {
377 anchors { 379 anchors {
378 verticalCenter: parent.verticalCenter 380 verticalCenter: parent.verticalCenter
379 right: parent.right 381 right: parent.right
380 rightMargin: Kube.Units.largeSpacing 382 rightMargin: Kube.Units.largeSpacing
381 } 383 }
382 columns: 2
383 spacing: Kube.Units.smallSpacing 384 spacing: Kube.Units.smallSpacing
384 385
385 Kube.Button { 386 Kube.Button {
@@ -405,6 +406,12 @@ Rectangle {
405 } 406 }
406 } 407 }
407 } 408 }
409 Row {
410 Kube.ExtensionPoint {
411 extensionPoint: "extensions/mailview"
412 context: {"mail": footer.mail, "subject": footer.subject, "accountId": currentAccount}
413 }
414 }
408 } 415 }
409 } 416 }
410 417