Add alternative main page mechanism

pull/1116/head
Simon Stürz 2025-03-18 08:53:49 +01:00
parent 30fbe16f82
commit 0cf66684d0
2 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,8 @@ Item {
property string defaultMainView: "things"
property string alternativeMainPage: ""
property var mainMenuLinks: null
property bool closedSource: false

View File

@ -212,7 +212,12 @@ Item {
if (engine.jsonRpcClient.connected) {
print("Connected to", engine.jsonRpcClient.currentHost.uuid, engine.jsonRpcClient.currentHost.name)
pageStack.push(Qt.resolvedUrl("MainPage.qml"))
if (Configuration.alternativeMainPage !== "") {
print("Loading alternative main page:", Configuration.alternativeMainPage)
pageStack.push(Qt.resolvedUrl(Configuration.alternativeMainPage))
} else {
pageStack.push(Qt.resolvedUrl("MainPage.qml"))
}
return;
}