Warning, /network/kdenetwork-filesharing/samba/filepropertiesplugin/qml/InstallPage.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 Samba.Installer { 0014 id: installer 0015 0016 onInstalledChanged: { 0017 if (!installer.installed) { 0018 return 0019 } 0020 // Installation is a bit special because it eventually ends in a reboot. So we push that page onto the 0021 // pending pages and move to the group page. The group page in turn will either explicitly 0022 // go to the reboot page (if group changes were made) or pop a pending page if groups are already cool. 0023 // In either event it'll end up on the reboot page because of our pending meddling here. 0024 pendingStack.push("RebootPage.qml") 0025 stackReplace("GroupPage.qml") 0026 } 0027 } 0028 0029 Kirigami.PlaceholderMessage { 0030 anchors.centerIn: parent 0031 width: parent.width 0032 0033 text: xi18nc("@info", "The <application>Samba</application> file sharing service must be installed before folders can be shared.") 0034 helpfulAction: Kirigami.Action { 0035 icon.name: "install" 0036 text: i18nc("@button", "Install Samba") 0037 onTriggered: installer.install() 0038 enabled: !installer.installing && !installer.installed 0039 } 0040 0041 QQC2.Label { 0042 Layout.alignment: Qt.AlignHCenter 0043 Layout.fillWidth: true 0044 text: i18nc("@label", "The Samba package failed to install.") 0045 wrapMode: Text.Wrap 0046 visible: installer.failed 0047 } 0048 QQC2.ProgressBar { 0049 Layout.alignment: Qt.AlignHCenter 0050 Layout.fillWidth: true 0051 Layout.margins: Kirigami.Units.largeSpacing * 2 0052 indeterminate: true 0053 visible: installer.installing 0054 } 0055 } 0056 }