Refactor RoomPage into various component

This commit is contained in:
Tobias Fella
2023-05-06 15:09:00 +00:00
parent c9ddf2f04a
commit e0983fcc8c
13 changed files with 742 additions and 574 deletions

View File

@@ -0,0 +1,35 @@
// SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
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.PlaceholderMessage {
id: root
required property var currentRoom
text: i18n("Accept this invitation?")
RowLayout {
QQC2.Button {
Layout.alignment : Qt.AlignHCenter
text: i18n("Reject")
onClicked: RoomManager.leaveRoom(root.currentRoom);
}
QQC2.Button {
Layout.alignment : Qt.AlignHCenter
text: i18n("Accept")
onClicked: {
root.currentRoom.acceptInvitation();
}
}
}
}