1// SPDX-FileCopyrightText: 2021 Nheko Contributors
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5import QtQuick 2.9
6import QtQuick.Controls 2.3
7import QtQuick.Layouts 1.2
8import im.nheko 1.0
9
10Item {
11    implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0
12    height: implicitHeight
13    Layout.fillWidth: true
14
15    Rectangle {
16        id: warningRect
17
18        visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
19        color: Nheko.colors.base
20        anchors.fill: parent
21        z: 3
22
23        Label {
24            id: warningDisplay
25
26            anchors.left: parent.left
27            anchors.leftMargin: 10
28            anchors.right: parent.right
29            anchors.rightMargin: 10
30            anchors.bottom: parent.bottom
31            color: Nheko.theme.red
32            text: qsTr("You are about to notify the whole room")
33            textFormat: Text.PlainText
34        }
35
36    }
37
38}
39