diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-08 11:53:12 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-08 11:53:12 +0200 |
commit | 4a5c01f6407acb94ecd10173279902fdcb850ad9 (patch) | |
tree | dd9a4beccbacdf43dbcffd09c96635cda3619cd8 | |
parent | 10394dc130f8117b54e0590f41aadff3ee1f9332 (diff) | |
download | kube-4a5c01f6407acb94ecd10173279902fdcb850ad9.tar.gz kube-4a5c01f6407acb94ecd10173279902fdcb850ad9.zip |
Fix up the rest of the account settings.
3 files changed, 193 insertions, 212 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 | } |
diff --git a/accounts/imap/package/contents/ui/ImapAccountSettings.qml b/accounts/imap/package/contents/ui/ImapAccountSettings.qml index f2a68d9f..fec070f2 100644 --- a/accounts/imap/package/contents/ui/ImapAccountSettings.qml +++ b/accounts/imap/package/contents/ui/ImapAccountSettings.qml | |||
@@ -26,9 +26,10 @@ import org.kube.accounts.imap 1.0 as ImapAccount | |||
26 | Item { | 26 | Item { |
27 | 27 | ||
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Connect your IMAP account" | 29 | property string heading: qsTr("Connect your IMAP 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. For information about which SMTP, IMAP address, which authentification and port to be used, please contact your email provider." | 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 | 31 | property bool valid: true |
32 | implicitHeight: grid.implicitHeight | ||
32 | 33 | ||
33 | ImapAccount.ImapSettings { | 34 | ImapAccount.ImapSettings { |
34 | id: imapSettings | 35 | id: imapSettings |
@@ -43,111 +44,103 @@ Item { | |||
43 | function remove(){ | 44 | function remove(){ |
44 | imapSettings.remove() | 45 | imapSettings.remove() |
45 | } | 46 | } |
46 | 47 | GridLayout { | |
47 | Item { | 48 | id: grid |
48 | anchors { | 49 | anchors.fill: parent |
49 | 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 | ||
50 | } | 57 | } |
51 | 58 | Kube.RequiredTextField { | |
52 | GridLayout { | 59 | Layout.fillWidth: true |
53 | anchors { | 60 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") |
54 | fill: parent | 61 | text: imapSettings.accountName |
55 | } | 62 | onTextChanged: { |
56 | columns: 2 | 63 | imapSettings.accountName = text |
57 | columnSpacing: Kube.Units.largeSpacing | ||
58 | rowSpacing: Kube.Units.largeSpacing | ||
59 | |||
60 | Kube.Label { | ||
61 | text: qsTr("Title of Account") | ||
62 | Layout.alignment: Qt.AlignRight | ||
63 | } | ||
64 | Kube.RequiredTextField { | ||
65 | Layout.fillWidth: true | ||
66 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | ||
67 | text: imapSettings.accountName | ||
68 | onTextChanged: { | ||
69 | imapSettings.accountName = text | ||
70 | } | ||
71 | } | 64 | } |
65 | } | ||
72 | 66 | ||
73 | Kube.Label { | 67 | Kube.Label { |
74 | text: qsTr("Name") | 68 | text: qsTr("Name") |
75 | Layout.alignment: Qt.AlignRight | 69 | Layout.alignment: Qt.AlignRight |
76 | } | 70 | } |
77 | Kube.RequiredTextField { | 71 | Kube.RequiredTextField { |
78 | Layout.fillWidth: true | 72 | Layout.fillWidth: true |
79 | placeholderText: qsTr("Your name") | 73 | placeholderText: qsTr("Your name") |
80 | text: imapSettings.userName | 74 | text: imapSettings.userName |
81 | onTextChanged: { | 75 | onTextChanged: { |
82 | imapSettings.userName = text | 76 | imapSettings.userName = text |
83 | } | ||
84 | } | 77 | } |
78 | } | ||
85 | 79 | ||
86 | Kube.Label { | 80 | Kube.Label { |
87 | text: qsTr("Email address") | 81 | text: qsTr("Email address") |
88 | Layout.alignment: Qt.AlignRight | 82 | Layout.alignment: Qt.AlignRight |
89 | } | 83 | } |
90 | Kube.RequiredTextField { | 84 | Kube.RequiredTextField { |
91 | Layout.fillWidth: true | 85 | Layout.fillWidth: true |
92 | 86 | ||
93 | text: imapSettings.emailAddress | 87 | text: imapSettings.emailAddress |
94 | onTextChanged: { | 88 | onTextChanged: { |
95 | imapSettings.emailAddress = text | 89 | imapSettings.emailAddress = text |
96 | imapSettings.imapUsername = text | 90 | imapSettings.imapUsername = text |
97 | imapSettings.smtpUsername = text | 91 | imapSettings.smtpUsername = text |
98 | } | ||
99 | placeholderText: qsTr("Your email address") | ||
100 | } | 92 | } |
93 | placeholderText: qsTr("Your email address") | ||
94 | } | ||
101 | 95 | ||
102 | Kube.Label { | 96 | Kube.Label { |
103 | text: qsTr("Password") | 97 | text: qsTr("Password") |
104 | Layout.alignment: Qt.AlignRight | 98 | Layout.alignment: Qt.AlignRight |
105 | } | 99 | } |
106 | 100 | ||
107 | Kube.PasswordField { | 101 | Kube.PasswordField { |
108 | id: pwField | 102 | id: pwField |
109 | Layout.fillWidth: true | 103 | Layout.fillWidth: true |
110 | 104 | ||
111 | placeholderText: qsTr("Password of your email account") | 105 | placeholderText: qsTr("Password of your email account") |
112 | text: imapSettings.imapPassword | 106 | text: imapSettings.imapPassword |
113 | onTextChanged: { | 107 | onTextChanged: { |
114 | imapSettings.imapPassword = text | 108 | imapSettings.imapPassword = text |
115 | imapSettings.smtpPassword = text | 109 | imapSettings.smtpPassword = text |
116 | } | ||
117 | } | 110 | } |
111 | } | ||
118 | 112 | ||
119 | Kube.Label { | 113 | Kube.Label { |
120 | text: qsTr("IMAP server address") | 114 | text: qsTr("IMAP server address") |
121 | Layout.alignment: Qt.AlignRight | 115 | Layout.alignment: Qt.AlignRight |
122 | } | 116 | } |
123 | Kube.RequiredTextField { | 117 | Kube.RequiredTextField { |
124 | id: imapServer | 118 | id: imapServer |
125 | 119 | ||
126 | Layout.fillWidth: true | 120 | Layout.fillWidth: true |
127 | 121 | ||
128 | placeholderText: "imaps://mainserver.example.net:993" | 122 | placeholderText: "imaps://mainserver.example.net:993" |
129 | text: imapSettings.imapServer | 123 | text: imapSettings.imapServer |
130 | onTextChanged: { | 124 | onTextChanged: { |
131 | imapSettings.imapServer = text | 125 | imapSettings.imapServer = text |
132 | } | ||
133 | validator: imapSettings.imapServerValidator | ||
134 | } | 126 | } |
127 | validator: imapSettings.imapServerValidator | ||
128 | } | ||
135 | 129 | ||
136 | Kube.Label { | 130 | Kube.Label { |
137 | text: qsTr("Smtp address") | 131 | text: qsTr("Smtp address") |
138 | Layout.alignment: Qt.AlignRight | 132 | Layout.alignment: Qt.AlignRight |
139 | } | 133 | } |
140 | Kube.RequiredTextField { | 134 | Kube.RequiredTextField { |
141 | id: smtpServer | 135 | id: smtpServer |
142 | Layout.fillWidth: true | 136 | Layout.fillWidth: true |
143 | 137 | ||
144 | placeholderText: "smtps://mainserver.example.net:993" | 138 | placeholderText: "smtps://mainserver.example.net:993" |
145 | text: imapSettings.smtpServer | 139 | text: imapSettings.smtpServer |
146 | onTextChanged: { | 140 | onTextChanged: { |
147 | imapSettings.smtpServer = text | 141 | imapSettings.smtpServer = text |
148 | } | ||
149 | validator: imapSettings.smtpServerValidator | ||
150 | } | 142 | } |
143 | validator: imapSettings.smtpServerValidator | ||
151 | } | 144 | } |
152 | } | 145 | } |
153 | } | 146 | } |
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml index ba5bd766..0fb87810 100644 --- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml +++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml | |||
@@ -26,9 +26,10 @@ import org.kube.accounts.maildir 1.0 as MaildirAccount | |||
26 | 26 | ||
27 | Item { | 27 | Item { |
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Add your Maildir archive" | 29 | property string heading: qsTr("Add your Maildir archive") |
30 | property string subheadline: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube." | 30 | property string subheadline: qsTr("To let Kube access your maildir archive, add the path to your archive 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 | MaildirAccount.MaildirSettings { | 34 | MaildirAccount.MaildirSettings { |
34 | id: maildirSettings | 35 | id: maildirSettings |
@@ -44,66 +45,59 @@ Item { | |||
44 | maildirSettings.remove() | 45 | maildirSettings.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 |
52 | columnSpacing: Kube.Units.largeSpacing | ||
53 | rowSpacing: Kube.Units.largeSpacing | ||
51 | 54 | ||
52 | GridLayout { | 55 | Kube.Label { |
53 | anchors { | 56 | text: qsTr("Title of Account") |
54 | fill: parent | 57 | Layout.alignment: Qt.AlignRight |
58 | } | ||
59 | Kube.TextField { | ||
60 | Layout.fillWidth: true | ||
61 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | ||
62 | text: maildirSettings.accountName | ||
63 | onTextChanged: { | ||
64 | maildirSettings.accountName = text | ||
55 | } | 65 | } |
56 | columns: 2 | 66 | } |
57 | columnSpacing: Kube.Units.largeSpacing | 67 | |
58 | rowSpacing: Kube.Units.largeSpacing | 68 | Kube.Label { |
69 | text: qsTr("Path") | ||
70 | Layout.alignment: Qt.AlignRight | ||
71 | } | ||
72 | RowLayout { | ||
73 | Layout.fillWidth: true | ||
59 | 74 | ||
60 | Kube.Label { | ||
61 | text: qsTr("Title of Account") | ||
62 | Layout.alignment: Qt.AlignRight | ||
63 | } | ||
64 | Kube.TextField { | 75 | Kube.TextField { |
76 | id: path | ||
65 | Layout.fillWidth: true | 77 | Layout.fillWidth: true |
66 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | 78 | enabled: false |
67 | text: maildirSettings.accountName | 79 | text: maildirSettings.path |
68 | onTextChanged: { | ||
69 | maildirSettings.accountName = text | ||
70 | } | ||
71 | } | 80 | } |
72 | 81 | ||
73 | Kube.Label { | 82 | Controls.Button { |
74 | text: qsTr("Path") | 83 | iconName: Kube.Icons.folder |
75 | Layout.alignment: Qt.AlignRight | ||
76 | } | ||
77 | RowLayout { | ||
78 | Layout.fillWidth: true | ||
79 | 84 | ||
80 | Kube.TextField { | 85 | onClicked: { |
81 | id: path | 86 | fileDialogComponent.createObject(parent) |
82 | Layout.fillWidth: true | ||
83 | enabled: false | ||
84 | text: maildirSettings.path | ||
85 | } | 87 | } |
86 | 88 | ||
87 | Controls.Button { | 89 | Component { |
88 | iconName: Kube.Icons.folder | 90 | id: fileDialogComponent |
89 | 91 | Dialogs.FileDialog { | |
90 | onClicked: { | 92 | id: fileDialog |
91 | fileDialogComponent.createObject(parent) | ||
92 | } | ||
93 | |||
94 | Component { | ||
95 | id: fileDialogComponent | ||
96 | Dialogs.FileDialog { | ||
97 | id: fileDialog | ||
98 | 93 | ||
99 | visible: true | 94 | visible: true |
100 | title: "Choose the maildir folder" | 95 | title: "Choose the maildir folder" |
101 | 96 | ||
102 | selectFolder: true | 97 | selectFolder: true |
103 | 98 | ||
104 | onAccepted: { | 99 | onAccepted: { |
105 | maildirSettings.path = fileDialog.fileUrl | 100 | maildirSettings.path = fileDialog.fileUrl |
106 | } | ||
107 | } | 101 | } |
108 | } | 102 | } |
109 | } | 103 | } |