Merge pull request #42 from tanghus/fix-instance-url

Fix always trying to log in to mastodon.social.
This commit is contained in:
Dusko Angirevic 2018-12-14 11:42:39 +01:00 committed by GitHub
commit fb995fab60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,9 +63,10 @@ Page {
id: instance id: instance
focus: true focus: true
label: qsTr("Enter an Mastodon instance URL") label: qsTr("Enter an Mastodon instance URL")
placeholderText: label placeholderText: "https://mastodon.social"
text: "https://mastodon.social"
width: parent.width width: parent.width
validator: RegExpValidator { regExp: /^(ftp|http|https):\/\/[^ "]+$/ }
EnterKey.enabled: instance.acceptableInput;
EnterKey.iconSource: "image://theme/icon-m-enter-next" EnterKey.iconSource: "image://theme/icon-m-enter-next"
EnterKey.onClicked: { EnterKey.onClicked: {
Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" }); Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" });