Warning, /network/neochat/src/qml/InvitationView.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003 
0004 import QtQuick
0005 import QtQuick.Controls as QQC2
0006 import QtQuick.Layouts
0007 
0008 import org.kde.kirigami as Kirigami
0009 
0010 import org.kde.neochat
0011 
0012 Kirigami.PlaceholderMessage {
0013     id: root
0014 
0015     required property NeoChatRoom currentRoom
0016 
0017     text: i18n("Accept this invitation?")
0018     RowLayout {
0019         QQC2.Button {
0020             Layout.alignment: Qt.AlignHCenter
0021             text: i18nc("@action:button The thing being rejected is an invitation to chat", "Reject and ignore user")
0022 
0023             onClicked: {
0024                 RoomManager.leaveRoom(root.currentRoom);
0025                 root.currentRoom.connection.addToIgnoredUsers(root.currentRoom.invitingUser());
0026             }
0027         }
0028         QQC2.Button {
0029             Layout.alignment: Qt.AlignHCenter
0030             text: i18n("Reject")
0031 
0032             onClicked: RoomManager.leaveRoom(root.currentRoom)
0033         }
0034 
0035         QQC2.Button {
0036             Layout.alignment: Qt.AlignHCenter
0037             text: i18n("Accept")
0038 
0039             onClicked: {
0040                 root.currentRoom.acceptInvitation();
0041             }
0042         }
0043     }
0044 }