Warning, /network/kdenetwork-filesharing/samba/filepropertiesplugin/qml/GroupPage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0003     SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org>
0004 */
0005 
0006 import QtQuick 2.12
0007 import QtQuick.Controls 2.5 as QQC2
0008 import QtQuick.Layouts 1.14
0009 import org.kde.kirigami 2.12 as Kirigami
0010 import org.kde.filesharing.samba 1.0 as Samba
0011 
0012 Item {
0013     // This page may be after the InstallPage and so we need to create a GroupManager when the page loads
0014     // rather than relying on the global instance that runs from the get go so we can evaluate the status AFTER
0015     // samba installation.
0016     Samba.GroupManager {
0017         id: manager
0018         onReadyChanged: {
0019             if (ready && manager.errorText.length === 0) { // no error; nothing for us to do
0020                 stackReplace(pendingStack.pop())
0021             }
0022         }
0023         onNeedsReboot: () => {
0024             stackReplace("RebootPage.qml")
0025         }
0026         onHelpfulActionError: (error) => {
0027             actionErrorMessage.text = error
0028         }
0029     }
0030 
0031     QQC2.BusyIndicator {
0032         anchors.centerIn: parent
0033         visible: !manager.ready
0034         running: visible
0035     }
0036 
0037     ColumnLayout {
0038         anchors.fill: parent
0039         visible: manager.ready
0040 
0041         Kirigami.InlineMessage {
0042             id: actionErrorMessage
0043             Layout.alignment: Qt.AlignTop
0044             Layout.fillWidth: true
0045             type: Kirigami.MessageType.Error
0046             visible: text != ""
0047         }
0048 
0049         Kirigami.PlaceholderMessage {
0050             icon.name: "emblem-error"
0051             text: manager.errorText
0052             explanation: manager.errorExplanation
0053             helpfulAction: Kirigami.Action {
0054                 enabled: manager.hasHelpfulAction
0055                 icon.name: manager.helpfulActionIcon
0056                 text: manager.helpfulActionText
0057                 onTriggered: manager.performHelpfulAction()
0058             }
0059         }
0060     }
0061 }