summary refs log tree commit diff
path: root/resources/qml/NotificationWarning.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-09-02 03:15:07 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-09-02 03:15:39 +0200
commit3528fe4e5dee1684f43e14fc9c6a50b4c1e25faf (patch)
treede846207ac1332fd8ae97662c3c8fbe4540b4dbf /resources/qml/NotificationWarning.qml
parentTranslated using Weblate (Estonian) (diff)
downloadnheko-3528fe4e5dee1684f43e14fc9c6a50b4c1e25faf.tar.xz
Warn the user before they ping the whole room
Diffstat (limited to 'resources/qml/NotificationWarning.qml')
-rw-r--r--resources/qml/NotificationWarning.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/resources/qml/NotificationWarning.qml b/resources/qml/NotificationWarning.qml
new file mode 100644

index 00000000..b606581b --- /dev/null +++ b/resources/qml/NotificationWarning.qml
@@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: 2021 Nheko Contributors +// +// SPDX-License-Identifier: GPL-3.0-or-later + +import QtQuick 2.9 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.2 +import im.nheko 1.0 + +Item { + implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0 + height: implicitHeight + Layout.fillWidth: true + + Rectangle { + id: warningRect + + visible: (room && room.permissions.canPingRoom && room.input.containsAtRoom) + color: Nheko.colors.base + anchors.fill: parent + z: 3 + + Label { + id: warningDisplay + + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.bottom: parent.bottom + color: Nheko.theme.red + text: qsTr("You will be pinging the whole room") + textFormat: Text.PlainText + } + + } + +}