More properties to check if URL is Valid
This commit is contained in:
parent
0989216d90
commit
8e963c7e0f
3 changed files with 28 additions and 23 deletions
|
@ -349,7 +349,12 @@ const QString NotesApi::errorMessage(int error) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotesApi::verifyUrl(QUrl url) {
|
void NotesApi::verifyUrl(QUrl url) {
|
||||||
emit urlValidChanged(url.isValid());
|
emit urlValidChanged(
|
||||||
|
url.isValid()&&
|
||||||
|
!url.isRelative() &&
|
||||||
|
!url.userName().isEmpty() &&
|
||||||
|
!url.password().isEmpty() &&
|
||||||
|
!url.host().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotesApi::requireAuthentication(QNetworkReply *reply, QAuthenticator *authenticator) {
|
void NotesApi::requireAuthentication(QNetworkReply *reply, QAuthenticator *authenticator) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ class NotesApi : public QObject
|
||||||
// Generic API properties
|
// Generic API properties
|
||||||
Q_PROPERTY(bool verifySsl READ verifySsl WRITE setVerifySsl NOTIFY verifySslChanged) // to allow selfsigned certificates
|
Q_PROPERTY(bool verifySsl READ verifySsl WRITE setVerifySsl NOTIFY verifySslChanged) // to allow selfsigned certificates
|
||||||
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) // complete API URL = <scheme>://<username>:<password>@<host>[:<port>]/<path>
|
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) // complete API URL = <scheme>://<username>:<password>@<host>[:<port>]/<path>
|
||||||
Q_PROPERTY(QString server READ server WRITE setServer NOTIFY serverChanged)
|
Q_PROPERTY(QString server READ server WRITE setServer NOTIFY serverChanged) // url without username and password = <scheme>://<host>[:<port>]/<path>
|
||||||
Q_PROPERTY(QString scheme READ scheme WRITE setScheme NOTIFY schemeChanged)
|
Q_PROPERTY(QString scheme READ scheme WRITE setScheme NOTIFY schemeChanged)
|
||||||
Q_PROPERTY(QString host READ host WRITE setHost NOTIFY hostChanged)
|
Q_PROPERTY(QString host READ host WRITE setHost NOTIFY hostChanged)
|
||||||
Q_PROPERTY(int port READ port WRITE setPort NOTIFY portChanged)
|
Q_PROPERTY(int port READ port WRITE setPort NOTIFY portChanged)
|
||||||
|
|
|
@ -138,103 +138,103 @@
|
||||||
<context>
|
<context>
|
||||||
<name>LoginPage</name>
|
<name>LoginPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="17"/>
|
<location filename="../qml/pages/LoginPage.qml" line="23"/>
|
||||||
<source>Nextcloud Login</source>
|
<source>Nextcloud Login</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="167"/>
|
<location filename="../qml/pages/LoginPage.qml" line="173"/>
|
||||||
<source>Nextcloud server</source>
|
<source>Nextcloud server</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="240"/>
|
<location filename="../qml/pages/LoginPage.qml" line="246"/>
|
||||||
<source>Username</source>
|
<source>Username</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="251"/>
|
<location filename="../qml/pages/LoginPage.qml" line="257"/>
|
||||||
<source>Password</source>
|
<source>Password</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="226"/>
|
<location filename="../qml/pages/LoginPage.qml" line="232"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="94"/>
|
<location filename="../qml/pages/LoginPage.qml" line="100"/>
|
||||||
<source>Follow the instructions in the browser</source>
|
<source>Follow the instructions in the browser</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="103"/>
|
<location filename="../qml/pages/LoginPage.qml" line="109"/>
|
||||||
<source>Login successfull!</source>
|
<source>Login successfull!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="100"/>
|
<location filename="../qml/pages/LoginPage.qml" line="106"/>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="109"/>
|
<location filename="../qml/pages/LoginPage.qml" line="115"/>
|
||||||
<source>Login failed!</source>
|
<source>Login failed!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="89"/>
|
<location filename="../qml/pages/LoginPage.qml" line="95"/>
|
||||||
<source>Enter your credentials</source>
|
<source>Enter your credentials</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="208"/>
|
<location filename="../qml/pages/LoginPage.qml" line="214"/>
|
||||||
<source>Enforce legacy login</source>
|
<source>Enforce legacy login</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="226"/>
|
<location filename="../qml/pages/LoginPage.qml" line="232"/>
|
||||||
<source>Login</source>
|
<source>Login</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="226"/>
|
<location filename="../qml/pages/LoginPage.qml" line="232"/>
|
||||||
<source>Re-Login</source>
|
<source>Re-Login</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="260"/>
|
<location filename="../qml/pages/LoginPage.qml" line="266"/>
|
||||||
<source>Test Login</source>
|
<source>Test Login</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="266"/>
|
<location filename="../qml/pages/LoginPage.qml" line="272"/>
|
||||||
<source>Note</source>
|
<source>Note</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="274"/>
|
<location filename="../qml/pages/LoginPage.qml" line="280"/>
|
||||||
<source>The <a href="https://apps.nextcloud.com/apps/notes">Notes</a> app needs to be installed on the Nextcloud server for this app to work.</source>
|
<source>The <a href="https://apps.nextcloud.com/apps/notes">Notes</a> app needs to be installed on the Nextcloud server for this app to work.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="278"/>
|
<location filename="../qml/pages/LoginPage.qml" line="284"/>
|
||||||
<source>Security</source>
|
<source>Security</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="285"/>
|
<location filename="../qml/pages/LoginPage.qml" line="291"/>
|
||||||
<source><strong>CAUTION: Your password will be saved without any encryption on the device!</strong><br>Please consider creating a dedicated app password! Open your Nextcloud in a browser and go to <i>Settings</i> → <i>Security</i>.</source>
|
<source><strong>CAUTION: Your password will be saved without any encryption on the device!</strong><br>Please consider creating a dedicated app password! Open your Nextcloud in a browser and go to <i>Settings</i> → <i>Security</i>.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="289"/>
|
<location filename="../qml/pages/LoginPage.qml" line="295"/>
|
||||||
<source>Do not check certificates</source>
|
<source>Do not check certificates</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="290"/>
|
<location filename="../qml/pages/LoginPage.qml" line="296"/>
|
||||||
<source>Enable this option to allow selfsigned certificates</source>
|
<source>Enable this option to allow selfsigned certificates</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/LoginPage.qml" line="299"/>
|
<location filename="../qml/pages/LoginPage.qml" line="305"/>
|
||||||
<source>Allow unencrypted connections</source>
|
<source>Allow unencrypted connections</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in a new issue