Warning, /network/neochat/src/qml/DevicesCard.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2020 - 2023 Tobias Fella <tobias.fella@kde.org>
0002 // SPDX-FileCopyrightText: 2022 James Graham <james.h.graham@protonmail.com>
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 import QtQuick
0006 import QtQuick.Layouts
0007 
0008 import org.kde.kirigami as Kirigami
0009 import org.kde.kirigamiaddons.formcard as FormCard
0010 
0011 import org.kde.neochat
0012 
0013 ColumnLayout {
0014     id: root
0015 
0016     required property string title
0017     required property var type
0018     required property bool showVerifyButton
0019 
0020     visible: deviceRepeater.count > 0
0021 
0022     FormCard.FormHeader {
0023         title: root.title
0024     }
0025 
0026     FormCard.FormCard {
0027         id: devicesCard
0028 
0029         Repeater {
0030             id: deviceRepeater
0031             model: DevicesProxyModel {
0032                 sourceModel: devicesModel
0033                 type: root.type
0034             }
0035 
0036             Kirigami.LoadingPlaceholder {
0037                 visible: deviceModel.count === 0 // We can assume 0 means loading since there is at least one device
0038                 anchors.centerIn: parent
0039             }
0040 
0041             delegate: DeviceDelegate {
0042                 showVerifyButton: root.showVerifyButton
0043             }
0044         }
0045     }
0046 }