diff options
Diffstat (limited to 'accounts/imap/package/contents/ui/ImapAccountSettings.qml')
-rw-r--r-- | accounts/imap/package/contents/ui/ImapAccountSettings.qml | 175 |
1 files changed, 84 insertions, 91 deletions
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 | } |