Add troubleshooting page in dashboard
This commit is contained in:
+7
-2
@@ -183,10 +183,15 @@ if (WIVRN_BUILD_SERVER)
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_DASHBOARD)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Quick QuickControls2 Gui Widgets DBus Network LinguistTools)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Quick Test Gui QuickControls2 Widgets Network)
|
||||
|
||||
find_package(ECM 5.115 REQUIRED NO_MODULE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
|
||||
|
||||
find_package(KF6 REQUIRED COMPONENTS Kirigami I18n CoreAddons QQC2DesktopStyle IconThemes)
|
||||
find_package(KF6Kirigami)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
find_package(QCoro6 REQUIRED COMPONENTS Core Network Qml)
|
||||
find_package(KF6Kirigami)
|
||||
qcoro_enable_coroutines()
|
||||
|
||||
if (WIVRN_CHECK_CAPSYSNICE)
|
||||
|
||||
@@ -1,36 +1,11 @@
|
||||
# cmake_minimum_required(VERSION 3.20)
|
||||
# project(kirigami-tutorial)
|
||||
|
||||
find_package(ECM 5.115 REQUIRED NO_MODULE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
# include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(ECMFindQmlModule)
|
||||
include(ECMQmlModule)
|
||||
include(I18n)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS
|
||||
Core
|
||||
Quick
|
||||
Test
|
||||
Gui
|
||||
QuickControls2
|
||||
Widgets
|
||||
)
|
||||
|
||||
find_package(KF6 REQUIRED COMPONENTS
|
||||
Kirigami
|
||||
I18n
|
||||
CoreAddons
|
||||
QQC2DesktopStyle
|
||||
IconThemes
|
||||
)
|
||||
|
||||
ecm_find_qmlmodule(org.kde.kirigami REQUIRED)
|
||||
|
||||
|
||||
add_executable(wivrn-dashboard
|
||||
main.cpp
|
||||
wivrn_server.cpp
|
||||
@@ -65,8 +40,12 @@ qt_add_qml_module(wivrn-dashboard
|
||||
qml/ConnectUsbDialog.qml
|
||||
qml/SelectGame.qml
|
||||
qml/SteamLaunchOptions.qml
|
||||
qml/TroubleshootPage.qml
|
||||
qml/TroubleshootCard.qml
|
||||
RESOURCES
|
||||
../images/wivrn.svg
|
||||
qml/Discord.svg
|
||||
qml/Github.svg
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M524.5 69.8a1.5 1.5 0 0 0 -.8-.7A485.1 485.1 0 0 0 404.1 32a1.8 1.8 0 0 0 -1.9 .9 337.5 337.5 0 0 0 -14.9 30.6 447.8 447.8 0 0 0 -134.4 0 309.5 309.5 0 0 0 -15.1-30.6 1.9 1.9 0 0 0 -1.9-.9A483.7 483.7 0 0 0 116.1 69.1a1.7 1.7 0 0 0 -.8 .7C39.1 183.7 18.2 294.7 28.4 404.4a2 2 0 0 0 .8 1.4A487.7 487.7 0 0 0 176 479.9a1.9 1.9 0 0 0 2.1-.7A348.2 348.2 0 0 0 208.1 430.4a1.9 1.9 0 0 0 -1-2.6 321.2 321.2 0 0 1 -45.9-21.9 1.9 1.9 0 0 1 -.2-3.1c3.1-2.3 6.2-4.7 9.1-7.1a1.8 1.8 0 0 1 1.9-.3c96.2 43.9 200.4 43.9 295.5 0a1.8 1.8 0 0 1 1.9 .2c2.9 2.4 6 4.9 9.1 7.2a1.9 1.9 0 0 1 -.2 3.1 301.4 301.4 0 0 1 -45.9 21.8 1.9 1.9 0 0 0 -1 2.6 391.1 391.1 0 0 0 30 48.8 1.9 1.9 0 0 0 2.1 .7A486 486 0 0 0 610.7 405.7a1.9 1.9 0 0 0 .8-1.4C623.7 277.6 590.9 167.5 524.5 69.8zM222.5 337.6c-29 0-52.8-26.6-52.8-59.2S193.1 219.1 222.5 219.1c29.7 0 53.3 26.8 52.8 59.2C275.3 311 251.9 337.6 222.5 337.6zm195.4 0c-29 0-52.8-26.6-52.8-59.2S388.4 219.1 417.9 219.1c29.7 0 53.3 26.8 52.8 59.2C470.7 311 447.5 337.6 417.9 337.6z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -319,15 +319,13 @@ Kirigami.ApplicationWindow {
|
||||
onTriggered: root.pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
|
||||
visible: root.pageStack.depth == 1
|
||||
enabled: root.server_started
|
||||
}/*,
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Troubleshoot")
|
||||
icon.name: "help-contents-symbolic"
|
||||
onTriggered: root.pageStack.push(Qt.resolvedUrl("TroubleshootPage.qml"))
|
||||
enabled: root.server_started && root.pageStack.depth == 1
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Templates as T
|
||||
|
||||
// Kirigami.Card {
|
||||
// id: card
|
||||
// property string title
|
||||
// property alias details: label.text
|
||||
//
|
||||
// banner.title: title
|
||||
// contentItem: BetterLabel {
|
||||
// id: label
|
||||
// }
|
||||
// }
|
||||
|
||||
Control {
|
||||
// T.ItemDelegate {
|
||||
id: card
|
||||
property alias title: label_title.text
|
||||
property alias details: label_details.text
|
||||
|
||||
Kirigami.Theme.inherit: false
|
||||
// Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
|
||||
property double expanded: 0
|
||||
Behavior on expanded {
|
||||
PropertyAnimation {
|
||||
duration: Kirigami.Units.shortDuration
|
||||
easing.type: Easing.InOutCubic
|
||||
}
|
||||
}
|
||||
|
||||
implicitHeight: column.anchors.topMargin + label_title.implicitHeight + card.expanded * (column.spacing + label_details.implicitHeight + column.spacing + actionsToolBar.implicitHeight) + column.anchors.bottomMargin
|
||||
implicitWidth: parent.width
|
||||
clip: true
|
||||
|
||||
// background: Kirigami.ShadowedRectangle {
|
||||
// anchors.fill: parent
|
||||
// border.width: 1
|
||||
// border.color: Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
|
||||
// radius: Kirigami.Units.cornerRadius
|
||||
// }
|
||||
|
||||
ColumnLayout {
|
||||
id: column
|
||||
anchors.fill: parent
|
||||
anchors.margins: Kirigami.Units.smallSpacing
|
||||
|
||||
BetterLabel {
|
||||
id: label_title
|
||||
font.pixelSize: 20
|
||||
Layout.preferredWidth: Math.min(implicitWidth, parent.width)
|
||||
// Layout.fillWidth: true
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: card.expanded = 1 - card.expanded
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
|
||||
BetterLabel {
|
||||
id: label_details
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Kirigami.ActionToolBar {
|
||||
id: actionsToolBar
|
||||
actions: card.actions
|
||||
position: ToolBar.Footer
|
||||
flat: false
|
||||
}
|
||||
}
|
||||
/*
|
||||
Rectangle {
|
||||
anchors.fill: column
|
||||
color: Qt.rgba(0, 0, 0.5, 0.5)
|
||||
}*/
|
||||
|
||||
property list<T.Action> actions
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as Controls
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import io.github.wivrn.wivrn
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
title: i18n("Troubleshoot")
|
||||
id: page
|
||||
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
|
||||
Kirigami.CardsLayout {
|
||||
maximumColumns: 1
|
||||
rowSpacing: Kirigami.Units.largeSpacing * 2
|
||||
|
||||
TroubleshootCard {
|
||||
title: i18n("I cannot find the WiVRn app on my headset")
|
||||
details: i18n("If you installed WiVRn over USB on a Meta headset, the app is in the \"unknown sources\" section.")
|
||||
}
|
||||
TroubleshootCard {
|
||||
title: i18n("I cannot see my computer in the WiVRn app")
|
||||
details: i18n("If the server is not visible or the connection fails, check that port 5353 (UDP) and 9757 (TCP and UDP) are open in your firewall.")
|
||||
}
|
||||
TroubleshootCard {
|
||||
title: i18n("I have an \"Incompatible WiVRn server\" error on my headset")
|
||||
details: i18n("<p>The version of the headset app and the server on your computer must match.</p><ul><li>The headset app version is in the \"About\" page</li><li>The server version is <b>%1</b></li></ul>", ApkInstaller.currentVersion)
|
||||
}
|
||||
TroubleshootCard {
|
||||
title: i18n("I have a \"Pairing is disabled\" error")
|
||||
details: i18n("If you have reinstalled the server or the client or if you want to connect another headset, you must enable pairing before connecting.") + "\n\n" + (WivrnServer.pairingEnabled ? i18n("Pairing is currently enabled with PIN %1.", WivrnServer.pin) : i18n("Pairing is currently disabled."))
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Enable pairing")
|
||||
visible: !WivrnServer.pairingEnabled
|
||||
onTriggered: WivrnServer.enable_pairing()
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Disable pairing")
|
||||
visible: WivrnServer.pairingEnabled
|
||||
onTriggered: WivrnServer.disable_pairing()
|
||||
}
|
||||
]
|
||||
}
|
||||
TroubleshootCard {
|
||||
title: i18n("I have no sound on my headset")
|
||||
details: i18n("When the headset is connected, select \"WiVRn\" as the default audio output device for applications to use it.")
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Report an issue")
|
||||
icon.source: Qt.resolvedUrl("Github.svg")
|
||||
onTriggered: Qt.openUrlExternally("https://github.com/WiVRn/WiVRn/issues")
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Ask on Discord")
|
||||
icon.source: Qt.resolvedUrl("Discord.svg")
|
||||
onTriggered: Qt.openUrlExternally("https://discord.gg/EHAYe3tTYa")
|
||||
}
|
||||
]
|
||||
|
||||
Shortcut {
|
||||
sequences: [StandardKey.Cancel]
|
||||
onActivated: applicationWindow().pageStack.pop()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user