diff --git a/src/devtools/DevtoolsPage.qml b/src/devtools/DevtoolsPage.qml index 6ef7c0d13..32cf6e27d 100644 --- a/src/devtools/DevtoolsPage.qml +++ b/src/devtools/DevtoolsPage.qml @@ -17,6 +17,7 @@ Kirigami.ScrollablePage { property NeoChatRoom room required property NeoChatConnection connection + property alias currentTabIndex: tabBar.currentIndex title: i18nc("@title", "Developer Tools") diff --git a/src/roominfo/RoomInformation.qml b/src/roominfo/RoomInformation.qml index f9bbbd9b3..0e0e075dd 100644 --- a/src/roominfo/RoomInformation.qml +++ b/src/roominfo/RoomInformation.qml @@ -166,6 +166,25 @@ QQC2.ScrollView { } } + Delegates.RoundedItemDelegate { + text: i18nc("@action:inmenu", "Inspect Room Data") + icon.name: "tools" + visible: NeoChatConfig.developerTools + activeFocusOnTab: true + + Layout.fillWidth: true + + onClicked: ((QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), { + connection: root.room.connection, + currentTabIndex: 1, // Room data tab + room: root.room + }, { + title: i18nc("@title:window", "Developer Tools"), + width: Kirigami.Units.gridUnit * 50, + height: Kirigami.Units.gridUnit * 42 + }) + } + Delegates.RoundedItemDelegate { id: leaveButton icon.name: "arrow-left-symbolic"