summaryrefslogtreecommitdiffstats
path: root/accounts/maildir/package
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/maildir/package')
-rw-r--r--accounts/maildir/package/contents/ui/MaildirAccountSettings.qml40
1 files changed, 16 insertions, 24 deletions
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
index d6292072..e508a475 100644
--- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
+++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
@@ -78,7 +78,7 @@ Rectangle {
78 Button { 78 Button {
79 iconName: "folder" 79 iconName: "folder"
80 onClicked: { 80 onClicked: {
81 fileDialogObject = fileDialogComponent.createObject(parent); 81 fileDialogComponent.createObject(parent);
82 } 82 }
83 83
84 Component { 84 Component {
@@ -92,10 +92,8 @@ Rectangle {
92 92
93 onAccepted: { 93 onAccepted: {
94 maildirSettings.path = fileDialog.fileUrl 94 maildirSettings.path = fileDialog.fileUrl
95 fileDialogObject.destroy()
96 } 95 }
97 onRejected: { 96 onRejected: {
98 fileDialogObject.destroy()
99 } 97 }
100 } 98 }
101 } 99 }
@@ -110,29 +108,33 @@ Rectangle {
110 108
111 Label { text: "Username" } 109 Label { text: "Username" }
112 TextField { 110 TextField {
113 id: username 111 placeholderText: "Username"
114 placeholderText: "username"
115 Layout.fillWidth: true 112 Layout.fillWidth: true
116 text: transportSettings.username 113 text: maildirSettings.smtpUsername
117 onTextChanged: { transportSettings.username = text; } 114 onTextChanged: { maildirSettings.smtpUsername = text; }
118 } 115 }
119 116
120 Label { text: "Password" } 117 Label { text: "Password" }
121 TextField { 118 TextField {
122 id: password 119 placeholderText: "Password"
123 placeholderText: "password"
124 Layout.fillWidth: true 120 Layout.fillWidth: true
125 text: transportSettings.password 121 text: maildirSettings.smtpPassword
126 onTextChanged: { transportSettings.password = text; } 122 onTextChanged: { maildirSettings.smtpPassword = text; }
127 } 123 }
128 124
129 Label { text: "Server" } 125 Label { text: "Server" }
130 TextField { 126 TextField {
131 id: server 127 id: server
132 placeholderText: "server" 128 placeholderText: "smtps://mainserver.example.net:465"
133 Layout.fillWidth: true 129 Layout.fillWidth: true
134 text: transportSettings.server 130 text: maildirSettings.smtpServer
135 onTextChanged: { transportSettings.server = text; } 131 onTextChanged: { maildirSettings.smtpServer = text; }
132 validator: maildirSettings.smtpServerValidator
133 Rectangle {
134 anchors.fill: parent
135 opacity: 0.2
136 color: server.acceptableInput ? "green" : "yellow"
137 }
136 } 138 }
137 139
138 MaildirAccount.MaildirSettings { 140 MaildirAccount.MaildirSettings {
@@ -140,19 +142,9 @@ Rectangle {
140 accountIdentifier: accountId 142 accountIdentifier: accountId
141 } 143 }
142 144
143 KubeSettings.Settings {
144 id: transportSettings
145 //TODO set a proper identifier
146 identifier: "transport.current"
147 property string server;
148 property string username;
149 property string password;
150 }
151
152 Button { 145 Button {
153 text: "Save" 146 text: "Save"
154 onClicked: { 147 onClicked: {
155 transportSettings.save();
156 maildirSettings.save(); 148 maildirSettings.save();
157 } 149 }
158 } 150 }