@@ -135,9 +135,13 @@ Item {
135
135
136
136
text: parent .displayText
137
137
onTextChanged: {
138
- availableProvidersRepeater .model = [];
139
- getAvailableProvidersButton .visible = true ;
140
- return text = text .replace (/ \s + / g , ' ' );
138
+ const cleanedText = text .replace (/ \s + / g , ' ' );
139
+ if (cleanedText !== cloudConnection .url ) {
140
+ getAuthenticationProvidersTimer .restart ();
141
+ } else {
142
+ getAuthenticationProvidersTimer .stop ();
143
+ }
144
+ return cleanedText;
141
145
}
142
146
143
147
Keys .onReturnPressed : loginFormSumbitHandler ()
@@ -146,6 +150,18 @@ Item {
146
150
color: " transparent"
147
151
}
148
152
}
153
+
154
+ Timer {
155
+ id: getAuthenticationProvidersTimer
156
+ interval: 500
157
+ repeat: false
158
+ running: false
159
+
160
+ onTriggered: {
161
+ cloudConnection .url = serverUrlField .text !== ' ' && prefixUrlWithProtocol (serverUrlField .text ) !== cloudConnection .defaultUrl ? prefixUrlWithProtocol (serverUrlField .text ) : cloudConnection .defaultUrl ;
162
+ cloudConnection .getAuthenticationProviders ();
163
+ }
164
+ }
149
165
}
150
166
151
167
TextField {
@@ -217,7 +233,7 @@ Item {
217
233
font: Theme .tipFont
218
234
color: Theme .secondaryTextColor
219
235
horizontalAlignment: Qt .AlignHCenter
220
- visible: cloudConnection .status === QFieldCloudConnection .Disconnected && (qfieldCloudLogin .hasCredentialsAuthentication && availableProvidersRepeater .count > 2 || availableProvidersRepeater .count > 1 || getAvailableProvidersButton . visible )
236
+ visible: cloudConnection .status === QFieldCloudConnection .Disconnected && (qfieldCloudLogin .hasCredentialsAuthentication && availableProvidersRepeater .count > 2 || availableProvidersRepeater .count > 1 )
221
237
}
222
238
223
239
Repeater {
@@ -236,19 +252,6 @@ Item {
236
252
}
237
253
}
238
254
239
- QfButton {
240
- id: getAvailableProvidersButton
241
- Layout .fillWidth : true
242
- text: qsTr (" Retrieve additional sign in methods" )
243
- enabled: ! cloudConnection .isFetchingAvailableProviders
244
- visible: false
245
-
246
- onClicked: {
247
- cloudConnection .url = serverUrlField .text !== ' ' && prefixUrlWithProtocol (serverUrlField .text ) !== cloudConnection .defaultUrl ? prefixUrlWithProtocol (serverUrlField .text ) : cloudConnection .defaultUrl ;
248
- cloudConnection .getAuthenticationProviders ();
249
- }
250
- }
251
-
252
255
Text {
253
256
id: cloudRegisterLabel
254
257
Layout .fillWidth : true
@@ -315,7 +318,6 @@ Item {
315
318
}
316
319
qfieldCloudLogin .hasCredentialsAuthentication = credentialAuthenticationAvailable;
317
320
availableProvidersRepeater .model = cloudConnection .availableProviders ;
318
- getAvailableProvidersButton .visible = false ;
319
321
}
320
322
}
321
323
0 commit comments