diff --git a/src/app/qml/ReasonDialog.qml b/src/app/qml/ReasonDialog.qml
index df29dacf1..8d8a52c7f 100644
--- a/src/app/qml/ReasonDialog.qml
+++ b/src/app/qml/ReasonDialog.qml
@@ -6,6 +6,7 @@ import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
+import org.kde.neochat
Kirigami.Page {
id: root
@@ -13,6 +14,8 @@ Kirigami.Page {
required property string placeholder
required property string actionText
required property string icon
+ required property bool reporting
+ required property NeoChatConnection connection
signal accepted(reason: string)
@@ -21,6 +24,15 @@ Kirigami.Page {
topPadding: 0
bottomPadding: 0
+ header: Kirigami.InlineMessage {
+ showCloseButton: false
+ visible: root.reporting
+ type: Kirigami.MessageType.Information
+ position: Kirigami.InlineMessage.Position.Header
+
+ text: xi18n("This report will only be sent to the administrators of %1 (your server).", root.connection.domain)
+ }
+
QQC2.TextArea {
id: reason
placeholderText: root.placeholder
diff --git a/src/app/qml/UserDetailDialog.qml b/src/app/qml/UserDetailDialog.qml
index 49b60569c..9f5240ddc 100644
--- a/src/app/qml/UserDetailDialog.qml
+++ b/src/app/qml/UserDetailDialog.qml
@@ -176,9 +176,11 @@ Kirigami.Dialog {
onTriggered: {
let dialog = ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Report User"),
- placeholder: i18nc("@info:placeholder", "Reason for reporting this user"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for reporting this user"),
icon: "dialog-warning-symbolic",
- actionText: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report")
+ actionText: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report"),
+ reporting: true,
+ connection: root.connection,
}, {
title: i18nc("@title", "Report User"),
width: Kirigami.Units.gridUnit * 25
@@ -244,9 +246,11 @@ Kirigami.Dialog {
onTriggered: {
let dialog = (root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Kick User"),
- placeholder: i18nc("@info:placeholder", "Reason for kicking this user"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for kicking this user"),
actionText: i18nc("@action:button 'Kick' as in 'Kick this user from the room'", "Kick"),
- icon: "im-kick-user"
+ icon: "im-kick-user",
+ reporting: false,
+ connection: root.connection,
}, {
title: i18nc("@title:dialog", "Kick User"),
width: Kirigami.Units.gridUnit * 25
@@ -271,9 +275,11 @@ Kirigami.Dialog {
onTriggered: {
let dialog = (root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Ban User"),
- placeholder: i18nc("@info:placeholder", "Reason for banning this user"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for banning this user"),
actionText: i18nc("@action:button 'Ban' as in 'Ban this user'", "Ban"),
- icon: "im-ban-user"
+ icon: "im-ban-user",
+ reporting: false,
+ connection: root.connection,
}, {
title: i18nc("@title:dialog", "Ban User"),
width: Kirigami.Units.gridUnit * 25
@@ -309,9 +315,11 @@ Kirigami.Dialog {
onTriggered: {
let dialog = ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Remove Messages"),
- placeholder: i18nc("@info:placeholder", "Reason for removing this user's recent messages"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for removing this user's recent messages"),
actionText: i18nc("@action:button 'Remove' as in 'Remove these messages'", "Remove"),
- icon: "delete"
+ icon: "delete",
+ reporting: false,
+ connection: root.connection,
}, {
title: i18nc("@title", "Remove Messages"),
width: Kirigami.Units.gridUnit * 25
diff --git a/src/rooms/RoomContextMenu.qml b/src/rooms/RoomContextMenu.qml
index a715d3b68..c62bcf2e6 100644
--- a/src/rooms/RoomContextMenu.qml
+++ b/src/rooms/RoomContextMenu.qml
@@ -157,9 +157,11 @@ KirigamiComponents.ConvergentContextMenu {
onTriggered: {
let dialog = (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Report Room"),
- placeholder: i18nc("@info:placeholder", "Reason for reporting this room"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for reporting this room"),
icon: "dialog-warning-symbolic",
- actionText: i18nc("@action:button 'Report' as in 'Report this room to the administrators'", "Report")
+ actionText: i18nc("@action:button 'Report' as in 'Report this room to the administrators'", "Report"),
+ reporting: true,
+ connection: root.connection,
}, {
title: i18nc("@title", "Report Room"),
width: Kirigami.Units.gridUnit * 25
diff --git a/src/timeline/DelegateContextMenu.qml b/src/timeline/DelegateContextMenu.qml
index d41c9595d..b0cfb94c8 100644
--- a/src/timeline/DelegateContextMenu.qml
+++ b/src/timeline/DelegateContextMenu.qml
@@ -206,9 +206,11 @@ KirigamiComponents.ConvergentContextMenu {
onTriggered: {
let dialog = ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Remove Message"),
- placeholder: i18nc("@info:placeholder", "Reason for removing this message"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for removing this message"),
actionText: i18nc("@action:button 'Remove' as in 'Remove this message'", "Remove"),
- icon: "delete"
+ icon: "delete",
+ reporting: false,
+ connection: root.connection,
}, {
title: i18nc("@title:dialog", "Remove Message"),
width: Kirigami.Units.gridUnit * 25
@@ -330,9 +332,11 @@ KirigamiComponents.ConvergentContextMenu {
onTriggered: {
let dialog = ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
title: i18nc("@title:dialog", "Report Message"),
- placeholder: i18nc("@info:placeholder", "Reason for reporting this message"),
+ placeholder: i18nc("@info:placeholder", "Optionally give a reason for reporting this message"),
icon: "dialog-warning-symbolic",
- actionText: i18nc("@action:button 'Report' as in 'Report this event to the administrators'", "Report")
+ actionText: i18nc("@action:button 'Report' as in 'Report this event to the administrators'", "Report"),
+ reporting: true,
+ connection: root.connection,
}, {
title: i18nc("@title", "Report Message"),
width: Kirigami.Units.gridUnit * 25