mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
This uses the same profile system as the regular game, and can be used to download the current benchmark (currently hardcoded, to be fixed later.) Or as always, install it offline from an existing zip.
51 lines
No EOL
1.2 KiB
QML
51 lines
No EOL
1.2 KiB
QML
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Window
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
import zone.xiv.astra
|
|
|
|
Kirigami.Page {
|
|
id: page
|
|
|
|
property var benchmarkInstaller
|
|
|
|
title: i18n("Benchmark Installation")
|
|
|
|
Kirigami.LoadingPlaceholder {
|
|
anchors.centerIn: parent
|
|
|
|
text: i18n("Downloading…")
|
|
}
|
|
|
|
Kirigami.PromptDialog {
|
|
id: errorDialog
|
|
title: i18n("Installation Error")
|
|
|
|
showCloseButton: false
|
|
standardButtons: Kirigami.Dialog.Ok
|
|
|
|
onAccepted: page.Window.window.pageStack.layers.pop()
|
|
onRejected: page.Window.window.pageStack.layers.pop()
|
|
}
|
|
|
|
Component.onCompleted: benchmarkInstaller.start()
|
|
|
|
Connections {
|
|
target: page.benchmarkInstaller
|
|
|
|
function onInstallFinished() {
|
|
// Prevents it from failing to push the page if the install happens too quickly.
|
|
Qt.callLater(() => applicationWindow().checkSetup());
|
|
}
|
|
|
|
function onError(message) {
|
|
errorDialog.subtitle = i18n("An error has occurred while installing the benchmark:\n\n%1", message);
|
|
errorDialog.open();
|
|
}
|
|
}
|
|
} |