From 3b95c42be68bc06691b08396e6063e4528c0b43c Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Mon, 27 May 2024 14:23:06 -0300 Subject: [PATCH] custom server UX enhancement --- app/qml/account/MMAccountController.qml | 6 ++++++ app/qml/account/MMLoginPage.qml | 1 + 2 files changed, 7 insertions(+) diff --git a/app/qml/account/MMAccountController.qml b/app/qml/account/MMAccountController.qml index 46fc60b57..7ee44cae8 100644 --- a/app/qml/account/MMAccountController.qml +++ b/app/qml/account/MMAccountController.qml @@ -130,6 +130,12 @@ Item { } onChangeServerClicked: function ( newServer ) { + // Ensure the newServer string ends with a '/' + // to format it as "https://my-server-app.com/" + if ( newServer && newServer.slice( -1 ) !== '/' ) { + newServer += '/'; + } + __merginApi.apiRoot = newServer } diff --git a/app/qml/account/MMLoginPage.qml b/app/qml/account/MMLoginPage.qml index 98a17611a..ee2fccca3 100644 --- a/app/qml/account/MMLoginPage.qml +++ b/app/qml/account/MMLoginPage.qml @@ -204,6 +204,7 @@ MMPage { textFieldBackground.color: __style.lightGreenColor text: root.apiRoot + placeholderText: qsTr( "https://my-server-app.com/" ) textField.inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly }