diff --git a/CMakeLists.txt b/CMakeLists.txt index b74085f..23697fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ install(DIRECTORY src DESTINATION ${DATA_DIR}) install(DIRECTORY qml DESTINATION ${DATA_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/AboutPage.qml DESTINATION ${DATA_DIR}qml/) -# example config file for local testing +# TODO: example config file for local testing # install(FILES example.conf DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME pantalaimon.conf) # Translations diff --git a/po/pantalaimon.thrrgilag.pot b/po/pantalaimon.thrrgilag.pot index 8ee05af..3d7f667 100644 --- a/po/pantalaimon.thrrgilag.pot +++ b/po/pantalaimon.thrrgilag.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pantalaimon.thrrgilag\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-09 20:24+0000\n" +"POT-Creation-Date: 2020-08-09 22:57+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,15 +25,15 @@ msgstr "" msgid "Save" msgstr "" -#: ../qml/Components/EditServerPage.qml:83 +#: ../qml/Components/EditServerPage.qml:89 msgid "Description:" msgstr "" -#: ../qml/Components/EditServerPage.qml:103 -msgid "Homeserver:" +#: ../qml/Components/EditServerPage.qml:109 +msgid "Homeserver URL:" msgstr "" -#: ../qml/Components/EditServerPage.qml:124 +#: ../qml/Components/EditServerPage.qml:131 msgid "Listen on 127.0.0.1:" msgstr "" diff --git a/qml/Components/EditServerPage.qml b/qml/Components/EditServerPage.qml index 678be56..28d8d72 100644 --- a/qml/Components/EditServerPage.qml +++ b/qml/Components/EditServerPage.qml @@ -23,6 +23,12 @@ Page { iconName: 'ok' text: i18n.tr('Save') onTriggered: { + if (homeserver.text.length == 0) { + homeserver.text = "https://matrix.org" + } + if (!/^https?:\/\//i.test(homeserver.text)) { + homeserver.text = "https://" + homeserver.text + } var data = { name: instance.text, homeserver: homeserver.text, @@ -85,7 +91,7 @@ Page { TextField { id: instance - text: "" + text: "my-homeserver" anchors.verticalCenter: parent.verticalCenter Layout.fillWidth: true } @@ -100,12 +106,13 @@ Page { Label { anchors.verticalCenter: parent.verticalCenter - text: i18n.tr('Homeserver:') + text: i18n.tr('Homeserver URL:') } TextField { id: homeserver text: "" + placeholderText: "https://matrix.org" anchors.verticalCenter: parent.verticalCenter Layout.fillWidth: true inputMethodHints: Qt.ImhUrlCharactersOnly diff --git a/src/.config.py.swp b/src/.config.py.swp deleted file mode 100644 index a9f1126..0000000 Binary files a/src/.config.py.swp and /dev/null differ