Add QR code scanner

This commit is contained in:
Tobias Fella
2023-12-16 16:46:30 +01:00
parent fbb4b962fa
commit c3fd2428a2
12 changed files with 319 additions and 41 deletions

View File

@@ -136,6 +136,17 @@ Kirigami.ApplicationWindow {
}
}
function onAskJoinRoom(room) {
joinRoomDialog.createObject(applicationWindow(), {
room: room,
connection: root.connection
}).open();
}
function onShowUserDetail(user) {
root.showUserDetail(user);
}
function onPushSpaceHome(room) {
root.spaceHomePage = pageStack.push(Qt.createComponent('org.kde.neochat', 'SpaceHomePage.qml'));
root.spaceHomePage.forceActiveFocus();
@@ -189,6 +200,11 @@ Kirigami.ApplicationWindow {
user: user
}).open();
}
function onExternalUrl(url) {
let dialog = Qt.createComponent("org.kde.neochat", "ConfirmUrlDialog.qml").createObject(applicationWindow());
dialog.link = url;
dialog.open();
}
}
function pushReplaceLayer(page, args) {
@@ -404,6 +420,11 @@ Kirigami.ApplicationWindow {
RoomWindow {}
}
Component {
id: joinRoomDialog
JoinRoomDialog {}
}
Component {
id: askDirectChatConfirmationComponent
@@ -481,4 +502,16 @@ Kirigami.ApplicationWindow {
dialog.closeDialog()
})
}
function showUserDetail(user) {
userDetailDialog.createObject(root.QQC2.ApplicationWindow.window, {
room: RoomManager.currentRoom ? RoomManager.currentRoom : null,
user: RoomManager.currentRoom ? RoomManager.currentRoom.getUser(user.id) : QmlUtils.getUser(user),
connection: root.connection
}).open();
}
Component {
id: userDetailDialog
UserDetailDialog {}
}
}