summaryrefslogtreecommitdiffstats
path: root/accounts
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-21 17:30:25 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-22 10:26:27 +0200
commit1b1e83aeb820df85ce7f10e81fe1f44deab2174e (patch)
tree8a137d8f286a3595d9171c24b45655c4b2b03427 /accounts
parent777cb40dae338e79e8f4160882b7c37900b42238 (diff)
downloadkube-1b1e83aeb820df85ce7f10e81fe1f44deab2174e.tar.gz
kube-1b1e83aeb820df85ce7f10e81fe1f44deab2174e.zip
A login view
Diffstat (limited to 'accounts')
-rw-r--r--accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml21
-rw-r--r--accounts/kolabnow/package/contents/ui/Login.qml62
2 files changed, 64 insertions, 19 deletions
diff --git a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml
index 8d8b6665..482ddc99 100644
--- a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml
+++ b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml
@@ -26,8 +26,8 @@ Item {
26 26
27 property string accountId 27 property string accountId
28 property string heading: qsTr("Connect your Kolab Now account") 28 property string heading: qsTr("Connect your Kolab Now account")
29 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.") 29 property string subheadline: qsTr("To let Kube access your account, fill in your name, username, password.")
30 property bool valid: accountField.acceptableInput && nameField.acceptableInput && emailField.acceptableInput && pwField.acceptableInput 30 property bool valid: nameField.acceptableInput && emailField.acceptableInput
31 31
32 KolabnowAccount.KolabnowSettings { 32 KolabnowAccount.KolabnowSettings {
33 id: kolabnowSettings 33 id: kolabnowSettings
@@ -85,23 +85,6 @@ Item {
85 } 85 }
86 placeholderText: qsTr("Your email address") 86 placeholderText: qsTr("Your email address")
87 } 87 }
88
89 Kube.Label {
90 text: qsTr("Password")
91 Layout.alignment: Qt.AlignRight
92 }
93
94 Kube.PasswordField {
95 id: pwField
96 Layout.fillWidth: true
97
98 placeholderText: qsTr("Password of your email account")
99 text: kolabnowSettings.imapPassword
100 onTextChanged: {
101 kolabnowSettings.imapPassword = text
102 kolabnowSettings.smtpPassword = text
103 }
104 }
105 } 88 }
106 } 89 }
107} 90}
diff --git a/accounts/kolabnow/package/contents/ui/Login.qml b/accounts/kolabnow/package/contents/ui/Login.qml
new file mode 100644
index 00000000..ae0213d5
--- /dev/null
+++ b/accounts/kolabnow/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
20import QtQuick 2.4
21import QtQuick.Layouts 1.1
22import org.kube.framework 1.0 as Kube
23import org.kube.accounts.kolabnow 1.0 as KolabnowAccount
24
25Item {
26 property string accountId
27 property string heading: qsTr("Login")
28 property string subheadline: settings.accountName
29
30 KolabnowAccount.KolabnowSettings {
31 id: settings
32 accountIdentifier: accountId
33 accountType: "kolabnow"
34 }
35
36 function login(){
37 settings.save()
38 }
39
40 GridLayout {
41 anchors {
42 fill: parent
43 }
44 columns: 2
45 columnSpacing: Kube.Units.largeSpacing
46 rowSpacing: Kube.Units.largeSpacing
47
48 Kube.Label {
49 text: qsTr("Password")
50 Layout.alignment: Qt.AlignRight
51 }
52
53 Kube.PasswordField {
54 id: pwField
55 Layout.fillWidth: true
56
57 placeholderText: qsTr("Password of your email account")
58 text: settings.imapPassword
59 onTextChanged: settings.imapPassword = text
60 }
61 }
62}