import QtQuick import QtQuick.Layouts import qs.Common import qs.Widgets // Matrix's own join/DM page - see IrcJoinPanel.qml's doc comment for why // this is a separate per-protocol page rather than one shared page. A // Space is just a room with an `m.space` creation type under the hood, // joined through this exact same endpoint, so there's no separate "join a // space" mechanism to build here. ColumnLayout { id: root property var account: null signal joinRequested(string roomIdOrAlias) signal dmRequested(string userId) spacing: Theme.spacingS StyledText { Layout.fillWidth: true text: "Join a room or space" color: Theme.surfaceVariantText font.pixelSize: Theme.fontSizeSmall } DankTextField { Layout.fillWidth: true placeholderText: "#room:server or !roomid:server" onAccepted: { if (text) root.joinRequested(text); text = ""; } } StyledText { Layout.topMargin: Theme.spacingS Layout.fillWidth: true text: "Start a DM" color: Theme.surfaceVariantText font.pixelSize: Theme.fontSizeSmall } DankTextField { Layout.fillWidth: true placeholderText: "@user:server" onAccepted: { if (text) root.dmRequested(text); text = ""; } } }