diff options
Diffstat (limited to 'accounts/gmail/package/contents/ui/GmailSettings.qml')
-rw-r--r-- | accounts/gmail/package/contents/ui/GmailSettings.qml | 138 |
1 files changed, 66 insertions, 72 deletions
diff --git a/accounts/gmail/package/contents/ui/GmailSettings.qml b/accounts/gmail/package/contents/ui/GmailSettings.qml index 7f0c737b..4fe6bc89 100644 --- a/accounts/gmail/package/contents/ui/GmailSettings.qml +++ b/accounts/gmail/package/contents/ui/GmailSettings.qml | |||
@@ -26,9 +26,10 @@ import org.kube.accounts.gmail 1.0 as GmailAccount | |||
26 | Item { | 26 | Item { |
27 | 27 | ||
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Connect your GMail account" | 29 | property string heading: qsTr("Connect your GMail account") |
30 | property string subheadline: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | 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.") |
31 | property bool valid: true | 31 | property bool valid: true |
32 | implicitHeight: grid.implicitHeight | ||
32 | 33 | ||
33 | GmailAccount.GmailSettings { | 34 | GmailAccount.GmailSettings { |
34 | id: gmailSettings | 35 | id: gmailSettings |
@@ -44,90 +45,83 @@ Item { | |||
44 | gmailSettings.remove() | 45 | gmailSettings.remove() |
45 | } | 46 | } |
46 | 47 | ||
47 | Item { | 48 | GridLayout { |
48 | anchors { | 49 | id: grid |
49 | fill: parent | 50 | anchors.fill: parent |
50 | } | 51 | columns: 2 |
51 | 52 | columnSpacing: Kube.Units.largeSpacing | |
52 | GridLayout { | 53 | rowSpacing: Kube.Units.largeSpacing |
53 | anchors { | ||
54 | fill: parent | ||
55 | } | ||
56 | columns: 2 | ||
57 | columnSpacing: Kube.Units.largeSpacing | ||
58 | rowSpacing: Kube.Units.largeSpacing | ||
59 | 54 | ||
60 | Kube.Label { | 55 | Kube.Label { |
61 | text: "Please note that GMail requires you to configure your account to allow IMAP connections from Kube: | 56 | text: "Please note that GMail requires you to configure your account to allow IMAP connections from Kube: |
62 | <ol type=''> | 57 | <ol type=''> |
63 | <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> 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. |
64 | <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 | <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." |
65 | Layout.alignment: Qt.AlignCenter | 60 | Layout.alignment: Qt.AlignCenter |
66 | Layout.columnSpan: 2 | 61 | Layout.columnSpan: 2 |
67 | onLinkActivated: Qt.openUrlExternally(link) | 62 | onLinkActivated: Qt.openUrlExternally(link) |
68 | textFormat: Text.StyledText | 63 | textFormat: Text.StyledText |
69 | MouseArea { | 64 | MouseArea { |
70 | anchors.fill: parent | 65 | anchors.fill: parent |
71 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text | 66 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text |
72 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor | 67 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor |
73 | } | ||
74 | } | 68 | } |
69 | } | ||
75 | 70 | ||
76 | Kube.Label { | 71 | Kube.Label { |
77 | text: qsTr("Title of Account") | 72 | text: qsTr("Title of Account") |
78 | Layout.alignment: Qt.AlignRight | 73 | Layout.alignment: Qt.AlignRight |
79 | } | 74 | } |
80 | Kube.TextField { | 75 | Kube.TextField { |
81 | Layout.fillWidth: true | 76 | Layout.fillWidth: true |
82 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | 77 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") |
83 | text: gmailSettings.accountName | 78 | text: gmailSettings.accountName |
84 | onTextChanged: { | 79 | onTextChanged: { |
85 | gmailSettings.accountName = text | 80 | gmailSettings.accountName = text |
86 | } | ||
87 | } | 81 | } |
82 | } | ||
88 | 83 | ||
89 | Kube.Label { | 84 | Kube.Label { |
90 | text: qsTr("Name") | 85 | text: qsTr("Name") |
91 | Layout.alignment: Qt.AlignRight | 86 | Layout.alignment: Qt.AlignRight |
92 | } | 87 | } |
93 | Kube.TextField { | 88 | Kube.TextField { |
94 | Layout.fillWidth: true | 89 | Layout.fillWidth: true |
95 | placeholderText: qsTr("Your name") | 90 | placeholderText: qsTr("Your name") |
96 | text: gmailSettings.userName | 91 | text: gmailSettings.userName |
97 | onTextChanged: { | 92 | onTextChanged: { |
98 | gmailSettings.userName = text | 93 | gmailSettings.userName = text |
99 | } | ||
100 | } | 94 | } |
95 | } | ||
101 | 96 | ||
102 | Kube.Label { | 97 | Kube.Label { |
103 | text: qsTr("Email address") | 98 | text: qsTr("Email address") |
104 | Layout.alignment: Qt.AlignRight | 99 | Layout.alignment: Qt.AlignRight |
105 | } | 100 | } |
106 | Kube.TextField { | 101 | Kube.TextField { |
107 | Layout.fillWidth: true | 102 | Layout.fillWidth: true |
108 | |||
109 | text: gmailSettings.emailAddress | ||
110 | onTextChanged: { | ||
111 | gmailSettings.emailAddress = text | ||
112 | } | ||
113 | placeholderText: qsTr("Your email address") | ||
114 | } | ||
115 | 103 | ||
116 | Kube.Label { | 104 | text: gmailSettings.emailAddress |
117 | text: qsTr("Password") | 105 | onTextChanged: { |
118 | Layout.alignment: Qt.AlignRight | 106 | gmailSettings.emailAddress = text |
119 | } | 107 | } |
108 | placeholderText: qsTr("Your email address") | ||
109 | } | ||
110 | |||
111 | Kube.Label { | ||
112 | text: qsTr("Password") | ||
113 | Layout.alignment: Qt.AlignRight | ||
114 | } | ||
120 | 115 | ||
121 | Kube.PasswordField { | 116 | Kube.PasswordField { |
122 | id: pwField | 117 | id: pwField |
123 | Layout.fillWidth: true | 118 | Layout.fillWidth: true |
124 | 119 | ||
125 | placeholderText: qsTr("Password of your email account") | 120 | placeholderText: qsTr("Password of your email account") |
126 | text: gmailSettings.imapPassword | 121 | text: gmailSettings.imapPassword |
127 | onTextChanged: { | 122 | onTextChanged: { |
128 | gmailSettings.imapPassword = text | 123 | gmailSettings.imapPassword = text |
129 | gmailSettings.smtpPassword = text | 124 | gmailSettings.smtpPassword = text |
130 | } | ||
131 | } | 125 | } |
132 | } | 126 | } |
133 | } | 127 | } |