From 72582c26f465925615ea51f8804eb47fed265803 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Wed, 16 Dec 2020 03:45:32 +0200 Subject: [PATCH] Added "Join chat by id" to the Debug page --- qml/pages/DebugPage.qml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/qml/pages/DebugPage.qml b/qml/pages/DebugPage.qml index b3e1b24..07b9e63 100644 --- a/qml/pages/DebugPage.qml +++ b/qml/pages/DebugPage.qml @@ -18,6 +18,7 @@ */ import QtQuick 2.6 import Sailfish.Silica 1.0 +import WerkWolf.Fernschreiber 1.0 import "../components" import "../js/twemoji.js" as Emoji import "../js/functions.js" as Functions @@ -41,6 +42,31 @@ Page { description: "here be dragons" } + + SectionHeader { + text: "Join chat by id" + } + + Row { + x: Theme.horizontalPageMargin + TextField { + id: chatId + anchors.bottom: parent.bottom + width: column.width - joinButton.width - Theme.horizontalPageMargin - Theme.paddingLarge + placeholderText: "Chat id" + labelVisible: false + EnterKey.iconSource: "image://theme/icon-m-enter-accept" + EnterKey.enabled: text.length > 0 + EnterKey.onClicked: tdLibWrapper.joinChat(text) + } + Button { + id: joinButton + text: "Join" + anchors.bottom: parent.bottom + enabled: chatId.text.length > 0 + onClicked: tdLibWrapper.joinChat(chatId.text) + } + } } VerticalScrollDecorator {}