Devtools Improvements
- Now has tabs setup as more features are added - First extra tab has basic server info - Use mobileform to make it look nicer - For the room data tab allow the room to be changed from within devtools - For the room data tab allow m.room.member events to be filtered out so other event types can be found easily - For the room data tab allow viewing room account data network/neochat#557
This commit is contained in:
committed by
Tobias Fella
parent
ca805917de
commit
85b40ca536
@@ -3,32 +3,40 @@
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
|
||||
import org.kde.neochat 1.0
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
Kirigami.Page {
|
||||
id: devtoolsPage
|
||||
|
||||
property var room
|
||||
|
||||
title: i18n("Room State - %1", room.displayName)
|
||||
title: i18n("Developer Tools")
|
||||
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
model: StateModel {
|
||||
room: devtoolsPage.room
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
|
||||
header: QQC2.TabBar {
|
||||
id: tabBar
|
||||
|
||||
QQC2.TabButton {
|
||||
text: qsTr("Room Data")
|
||||
}
|
||||
|
||||
delegate: Kirigami.BasicListItem {
|
||||
text: model.type
|
||||
subtitle: model.stateKey
|
||||
onClicked: applicationWindow().pageStack.pushDialogLayer('qrc:/MessageSourceSheet.qml', {
|
||||
sourceText: model.source
|
||||
}, {
|
||||
title: i18n("Event Source"),
|
||||
width: Kirigami.Units.gridUnit * 25
|
||||
});
|
||||
QQC2.TabButton {
|
||||
text: qsTr("Server Info")
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: swipeView
|
||||
anchors.fill: parent
|
||||
|
||||
currentIndex: tabBar.currentIndex
|
||||
|
||||
RoomData {}
|
||||
ServerData {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user