diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 08de74cf..25649368 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -121,7 +121,7 @@ jobs: - name: Prepare run: | apt-get update - apt-get install --yes curl wget sudo jq cmake gcc g++ git pkgconf libboost-all-dev libkirigami-dev gettext libarchive-dev nlohmann-json3-dev qcoro-qt6-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libvulkan-dev libssl-dev librsvg2-dev extra-cmake-modules + apt-get install --yes curl wget sudo jq cmake gcc g++ git pkgconf libboost-all-dev libkirigami-dev gettext libarchive-dev nlohmann-json3-dev qcoro-qt6-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libvulkan-dev libssl-dev librsvg2-dev extra-cmake-modules qml6-module-org-kde-kirigamiaddons-formcard - uses: actions/cache@v4 with: diff --git a/dashboard/CMakeLists.txt b/dashboard/CMakeLists.txt index e6de68db..bd057e90 100644 --- a/dashboard/CMakeLists.txt +++ b/dashboard/CMakeLists.txt @@ -5,6 +5,7 @@ include(ECMQmlModule) include(I18n) ecm_find_qmlmodule(org.kde.kirigami REQUIRED) +ecm_find_qmlmodule(org.kde.kirigamiaddons.formcard REQUIRED) add_executable(wivrn-dashboard avahi.cpp @@ -27,6 +28,7 @@ qt_add_dbus_interface(DBUS_INTERFACE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io. target_sources(wivrn-dashboard PRIVATE ${DBUS_INTERFACE_SRC}) set_source_files_properties(../images/wivrn.svg PROPERTIES QT_RESOURCE_ALIAS qml/wivrn.svg) +qt_add_resources(wivrn-dashboard PREFIX "/" BASE .. FILES ../images/wivrn.svg) set_source_files_properties(qml/DashboardSettings.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE @@ -36,6 +38,7 @@ qt_add_qml_module(wivrn-dashboard URI io.github.wivrn.wivrn QML_FILES qml/Main.qml + qml/About.qml qml/ApkInstallPage.qml qml/DashboardSettings.qml qml/SettingsPage.qml diff --git a/dashboard/main.cpp b/dashboard/main.cpp index d8accce5..55a7aa1b 100644 --- a/dashboard/main.cpp +++ b/dashboard/main.cpp @@ -1,4 +1,5 @@ #include "version.h" +#include #include #include #include @@ -26,6 +27,28 @@ int main(int argc, char * argv[]) app.setApplicationDisplayName(i18n("WiVRn dashboard")); + KAboutData aboutData( + QStringLiteral("wivrn-dashboard"), + i18nc("@title", "WiVRn"), + wivrn::display_version(), + i18n("WiVRn server"), + KAboutLicense::GPL_V3, + i18n("(c) 2022-2026 WiVRn development team")); + + aboutData.setHomepage("https://github.com/WiVRn/WiVRn"); + aboutData.setBugAddress("https://github.com/WiVRn/WiVRn/issues"); + aboutData.setProgramLogo(QIcon(":/qml/wivrn.svg")); + + aboutData.addComponent( + i18n("Monado"), + i18n("OpenXR runtime"), + "", + "https://monado.dev/", + KAboutLicense::BSL_V1); + + // Set aboutData as information about the app + KAboutData::setApplicationData(aboutData); + QCoro::Qml::registerTypes(); // Work around QTBUG-45105, QTBUG-46074, QTBUG-51112: flicker when resizing diff --git a/dashboard/qml/About.qml b/dashboard/qml/About.qml new file mode 100644 index 00000000..02c567b4 --- /dev/null +++ b/dashboard/qml/About.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Controls as Controls +import org.kde.kirigami as Kirigami +import org.kde.coreaddons as KCoreAddons +import org.kde.kirigamiaddons.formcard as FormCard + +FormCard.AboutPage { + aboutData: KCoreAddons.AboutData + donateUrl: "https://opencollective.com/wivrn" + getInvolvedUrl: "" + + footer: Controls.DialogButtonBox { + standardButtons: Controls.DialogButtonBox.NoButton + onAccepted: applicationWindow().pageStack.pop() + + Controls.Button { + text: i18nc("go back to the home page", "Back") + icon.name: "go-previous" + Controls.DialogButtonBox.buttonRole: Controls.DialogButtonBox.AcceptRole + } + } + + Shortcut { + sequences: [StandardKey.Cancel] + onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();} + } +} diff --git a/dashboard/qml/Main.qml b/dashboard/qml/Main.qml index 84834969..c3b59faf 100644 --- a/dashboard/qml/Main.qml +++ b/dashboard/qml/Main.qml @@ -421,6 +421,11 @@ Kirigami.ApplicationWindow { onTriggered: root.pageStack.push(Qt.createComponent("SettingsPage.qml").createObject()) enabled: root.server_started }, + Kirigami.Action { + text: i18n("About") + icon.name: "help-about" + onTriggered: root.pageStack.push(Qt.createComponent("About.qml").createObject()) + }, Kirigami.Action { text: i18n("Troubleshoot") icon.name: "help-contents-symbolic"