summaryrefslogtreecommitdiffstats
path: root/accounts/imap/package
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/imap/package')
-rw-r--r--accounts/imap/package/contents/ui/AccountSettings.qml129
-rw-r--r--accounts/imap/package/contents/ui/Login.qml62
-rw-r--r--accounts/imap/package/metadata.desktop8
3 files changed, 0 insertions, 199 deletions
diff --git a/accounts/imap/package/contents/ui/AccountSettings.qml b/accounts/imap/package/contents/ui/AccountSettings.qml
deleted file mode 100644
index d81f9c54..00000000
--- a/accounts/imap/package/contents/ui/AccountSettings.qml
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net>
3 Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20import QtQuick 2.4
21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Layouts 1.1
23import org.kube.framework 1.0 as Kube
24import org.kube.accounts.imap 1.0 as ImapAccount
25
26Item {
27
28 property string accountId
29 property string heading: qsTr("Connect your IMAP account")
30 property string subheadline: qsTr("To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube. For information about which SMTP, IMAP address, which authentification and port to be used, please contact your email provider.")
31 property bool valid: true
32 implicitHeight: grid.implicitHeight
33
34 ImapAccount.ImapSettings {
35 id: imapSettings
36 accountIdentifier: accountId
37 accountType: "imap"
38 }
39
40 function save(){
41 imapSettings.save()
42 }
43
44 function remove(){
45 imapSettings.remove()
46 }
47 GridLayout {
48 id: grid
49 anchors.fill: parent
50 columns: 2
51 columnSpacing: Kube.Units.largeSpacing
52 rowSpacing: Kube.Units.largeSpacing
53
54 Kube.Label {
55 text: qsTr("Title of Account")
56 Layout.alignment: Qt.AlignRight
57 }
58 Kube.RequiredTextField {
59 Layout.fillWidth: true
60 placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name")
61 text: imapSettings.accountName
62 onTextChanged: {
63 imapSettings.accountName = text
64 }
65 }
66
67 Kube.Label {
68 text: qsTr("Name")
69 Layout.alignment: Qt.AlignRight
70 }
71 Kube.RequiredTextField {
72 Layout.fillWidth: true
73 placeholderText: qsTr("Your name")
74 text: imapSettings.userName
75 onTextChanged: {
76 imapSettings.userName = text
77 }
78 }
79
80 Kube.Label {
81 text: qsTr("Email address")
82 Layout.alignment: Qt.AlignRight
83 }
84 Kube.RequiredTextField {
85 Layout.fillWidth: true
86
87 text: imapSettings.emailAddress
88 onTextChanged: {
89 imapSettings.emailAddress = text
90 imapSettings.imapUsername = text
91 imapSettings.smtpUsername = text
92 }
93 placeholderText: qsTr("Your email address")
94 }
95
96 Kube.Label {
97 text: qsTr("IMAP server address")
98 Layout.alignment: Qt.AlignRight
99 }
100 Kube.RequiredTextField {
101 id: imapServer
102
103 Layout.fillWidth: true
104
105 placeholderText: "imaps://mainserver.example.net:993"
106 text: imapSettings.imapServer
107 onTextChanged: {
108 imapSettings.imapServer = text
109 }
110 validator: imapSettings.imapServerValidator
111 }
112
113 Kube.Label {
114 text: qsTr("Smtp address")
115 Layout.alignment: Qt.AlignRight
116 }
117 Kube.RequiredTextField {
118 id: smtpServer
119 Layout.fillWidth: true
120
121 placeholderText: "smtps://mainserver.example.net:993"
122 text: imapSettings.smtpServer
123 onTextChanged: {
124 imapSettings.smtpServer = text
125 }
126 validator: imapSettings.smtpServerValidator
127 }
128 }
129}
diff --git a/accounts/imap/package/contents/ui/Login.qml b/accounts/imap/package/contents/ui/Login.qml
deleted file mode 100644
index 14e13e89..00000000
--- a/accounts/imap/package/contents/ui/Login.qml
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net>
3 Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20import QtQuick 2.4
21import QtQuick.Layouts 1.1
22import org.kube.framework 1.0 as Kube
23import org.kube.accounts.imap 1.0 as ImapAccount
24
25Item {
26 property alias accountId: settings.accountIdentifier
27 property string heading: qsTr("Login")
28 property string subheadline: settings.accountName
29
30 ImapAccount.ImapSettings {
31 id: settings
32 accountType: "imap"
33 }
34
35 function login(){
36 settings.save()
37 }
38
39 GridLayout {
40 anchors {
41 fill: parent
42 }
43 columns: 2
44 columnSpacing: Kube.Units.largeSpacing
45 rowSpacing: Kube.Units.largeSpacing
46
47 Kube.Label {
48 text: qsTr("Password")
49 Layout.alignment: Qt.AlignRight
50 }
51
52 Kube.PasswordField {
53 id: pwField
54 Layout.fillWidth: true
55 focus: true
56
57 placeholderText: qsTr("Password of your IMAP account")
58 text: settings.imapPassword
59 onTextChanged: settings.imapPassword = text
60 }
61 }
62}
diff --git a/accounts/imap/package/metadata.desktop b/accounts/imap/package/metadata.desktop
deleted file mode 100644
index 7c4320c3..00000000
--- a/accounts/imap/package/metadata.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
1[Desktop Entry]
2Name=Kube Imap Accounts Plugin
3X-KDE-PluginInfo-Name=org.kube.accounts.imap
4Exec=kpackagelauncherqml -a org.kube.accounts.imap
5X-Plasma-MainScript=ui/ImapAccountSettings.qml
6X-KDE-ServiceTypes=KPackage/GenericQML
7Icon=folder
8Type=Service