From 5ae287acf453c96f0350e12e5c7119ef91964d41 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 12 Dec 2018 02:00:31 +0100 Subject: [PATCH] Fix always trying to log in to mastodon.social. Should fix #39 --- qml/pages/LoginPage.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qml/pages/LoginPage.qml b/qml/pages/LoginPage.qml index 0250db6..ccf09d2 100644 --- a/qml/pages/LoginPage.qml +++ b/qml/pages/LoginPage.qml @@ -63,9 +63,10 @@ Page { id: instance focus: true label: qsTr("Enter an Mastodon instance URL") - placeholderText: label - text: "https://mastodon.social" + placeholderText: "https://mastodon.social" width: parent.width + validator: RegExpValidator { regExp: /^(ftp|http|https):\/\/[^ "]+$/ } + EnterKey.enabled: instance.acceptableInput; EnterKey.iconSource: "image://theme/icon-m-enter-next" EnterKey.onClicked: { Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" });