Warning, /network/neochat/src/qml/ReportSheet.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2022 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.Page { 0013 id: root 0014 0015 property NeoChatRoom room 0016 property string eventId 0017 0018 title: i18n("Report Message") 0019 0020 leftPadding: 0 0021 rightPadding: 0 0022 topPadding: 0 0023 bottomPadding: 0 0024 0025 QQC2.TextArea { 0026 id: reason 0027 placeholderText: i18n("Reason for reporting this message") 0028 anchors.fill: parent 0029 wrapMode: TextEdit.Wrap 0030 0031 background: Rectangle { 0032 color: Kirigami.Theme.backgroundColor 0033 } 0034 } 0035 0036 footer: QQC2.ToolBar { 0037 QQC2.DialogButtonBox { 0038 anchors.fill: parent 0039 Item { 0040 Layout.fillWidth: true 0041 } 0042 QQC2.Button { 0043 text: i18nc("@action:button 'Report' as in 'Report this event to the administrators'", "Report") 0044 icon.name: "dialog-warning-symbolic" 0045 QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole 0046 onClicked: { 0047 root.room.reportEvent(eventId, reason.text); 0048 root.closeDialog(); 0049 } 0050 } 0051 QQC2.Button { 0052 text: i18nc("@action", "Cancel") 0053 QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole 0054 onClicked: root.closeDialog() 0055 } 0056 } 0057 } 0058 }