diff options
-rw-r--r-- | accounts/imap/imapsettings.cpp | 1 | ||||
-rw-r--r-- | accounts/imap/package/contents/ui/ImapAccountSettings.qml | 17 | ||||
-rw-r--r-- | accounts/imap/package/contents/ui/Login.qml | 62 |
3 files changed, 63 insertions, 17 deletions
diff --git a/accounts/imap/imapsettings.cpp b/accounts/imap/imapsettings.cpp index 1f338e83..a9749878 100644 --- a/accounts/imap/imapsettings.cpp +++ b/accounts/imap/imapsettings.cpp | |||
@@ -33,6 +33,7 @@ void ImapSettings::load() | |||
33 | 33 | ||
34 | void ImapSettings::save() | 34 | void ImapSettings::save() |
35 | { | 35 | { |
36 | mSmtpPassword = mImapPassword; | ||
36 | saveAccount(); | 37 | saveAccount(); |
37 | saveImapResource(); | 38 | saveImapResource(); |
38 | saveMailtransportResource(); | 39 | saveMailtransportResource(); |
diff --git a/accounts/imap/package/contents/ui/ImapAccountSettings.qml b/accounts/imap/package/contents/ui/ImapAccountSettings.qml index fec070f2..d81f9c54 100644 --- a/accounts/imap/package/contents/ui/ImapAccountSettings.qml +++ b/accounts/imap/package/contents/ui/ImapAccountSettings.qml | |||
@@ -94,23 +94,6 @@ Item { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | Kube.Label { | 96 | Kube.Label { |
97 | text: qsTr("Password") | ||
98 | Layout.alignment: Qt.AlignRight | ||
99 | } | ||
100 | |||
101 | Kube.PasswordField { | ||
102 | id: pwField | ||
103 | Layout.fillWidth: true | ||
104 | |||
105 | placeholderText: qsTr("Password of your email account") | ||
106 | text: imapSettings.imapPassword | ||
107 | onTextChanged: { | ||
108 | imapSettings.imapPassword = text | ||
109 | imapSettings.smtpPassword = text | ||
110 | } | ||
111 | } | ||
112 | |||
113 | Kube.Label { | ||
114 | text: qsTr("IMAP server address") | 97 | text: qsTr("IMAP server address") |
115 | Layout.alignment: Qt.AlignRight | 98 | Layout.alignment: Qt.AlignRight |
116 | } | 99 | } |
diff --git a/accounts/imap/package/contents/ui/Login.qml b/accounts/imap/package/contents/ui/Login.qml new file mode 100644 index 00000000..14e13e89 --- /dev/null +++ b/accounts/imap/package/contents/ui/Login.qml | |||
@@ -0,0 +1,62 @@ | |||
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 | |||
20 | import QtQuick 2.4 | ||
21 | import QtQuick.Layouts 1.1 | ||
22 | import org.kube.framework 1.0 as Kube | ||
23 | import org.kube.accounts.imap 1.0 as ImapAccount | ||
24 | |||
25 | Item { | ||
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 | } | ||