summaryrefslogtreecommitdiffstats
path: root/accounts/gmail/qml/AccountSettings.qml
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-08-23 09:22:21 +0200
committerMinijackson <minijackson@riseup.net>2018-08-23 09:22:21 +0200
commitef1cf433c9598430654e87790fdb1be11f82ecd1 (patch)
tree26f3e78c96f1901fa9d123650719bb891ad3b7ad /accounts/gmail/qml/AccountSettings.qml
parente723ae9154f8a883ec563060b70e7ec04fc64fcf (diff)
downloadkube-ef1cf433c9598430654e87790fdb1be11f82ecd1.tar.gz
kube-ef1cf433c9598430654e87790fdb1be11f82ecd1.zip
Add caldav and carddav URLs + rename Gmail -> Google
Diffstat (limited to 'accounts/gmail/qml/AccountSettings.qml')
-rw-r--r--accounts/gmail/qml/AccountSettings.qml92
1 files changed, 0 insertions, 92 deletions
diff --git a/accounts/gmail/qml/AccountSettings.qml b/accounts/gmail/qml/AccountSettings.qml
deleted file mode 100644
index d7df5eaf..00000000
--- a/accounts/gmail/qml/AccountSettings.qml
+++ /dev/null
@@ -1,92 +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.gmail 1.0 as GmailAccount
24
25Item {
26
27 property string accountId
28 property string heading: qsTr("Connect your GMail account")
29 property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.")
30 property bool valid: true
31 implicitHeight: grid.implicitHeight
32
33 GmailAccount.GmailSettings {
34 id: gmailSettings
35 accountIdentifier: accountId
36 accountType: "gmail"
37 }
38
39 function save(){
40 gmailSettings.save()
41 }
42
43 function remove(){
44 gmailSettings.remove()
45 }
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: "Please note that GMail requires you to configure your account to allow IMAP connections from Kube:
56<ol type=''>
57<li> See <a href='https://support.google.com/mail/answer/7126229'>https://support.google.com/mail/answer/7126229</a> to configure your account to allow IMAP connections.
58<li> Visit <a href='https://myaccount.google.com/lesssecureapps'>https://myaccount.google.com/lesssecureapps</a> and enable the setting to allow Kube to connect to your account."
59 Layout.alignment: Qt.AlignCenter
60 Layout.columnSpan: 2
61 textFormat: Text.StyledText
62 }
63
64 Kube.Label {
65 text: qsTr("Name")
66 Layout.alignment: Qt.AlignRight
67 }
68 Kube.TextField {
69 Layout.fillWidth: true
70 placeholderText: qsTr("Your name")
71 text: gmailSettings.userName
72 onTextChanged: {
73 gmailSettings.userName = text
74 }
75 }
76
77 Kube.Label {
78 text: qsTr("Email address")
79 Layout.alignment: Qt.AlignRight
80 }
81 Kube.TextField {
82 Layout.fillWidth: true
83
84 text: gmailSettings.emailAddress
85 onTextChanged: {
86 gmailSettings.emailAddress = text
87 gmailSettings.accountName = text
88 }
89 placeholderText: qsTr("Your email address")
90 }
91 }
92}