matrixion/qml/NotificationWarning.qml

40 lines
990 B
QML
Raw Normal View History

// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 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
Item {
implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0
height: implicitHeight
Layout.fillWidth: true
Rectangle {
id: warningRect
visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
2022-04-11 05:18:16 +03:00
color: timelineRoot.palette.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
2021-10-01 04:24:28 +03:00
text: qsTr("You are about to notify the whole room")
textFormat: Text.PlainText
}
}
}