ServerBrowser: strip trailing slashes from URL

This commit is contained in:
miruka 2020-07-27 16:37:33 -04:00
parent db5d9b57f8
commit 865d6b8bc8

View File

@ -45,7 +45,7 @@ HBox {
}
acceptedUrl = url
acceptedUserUrl = args[0]
acceptedUserUrl = String(args[0])
loginFlows = flows
accepted()
@ -143,7 +143,8 @@ HBox {
Layout.fillWidth: true
HTextField {
readonly property string cleanText: text.toLowerCase().trim()
readonly property string cleanText:
text.toLowerCase().trim().replace(/\/+$/, "")
width: parent.width
error: ! /https?:\/\/.+/.test(cleanText)