2021-12-01 01:02:52 +01:00
|
|
|
import QtQuick 2.6
|
|
|
|
|
import QtQuick.Layouts 1.0
|
2022-03-10 12:23:07 +01:00
|
|
|
import QtQuick.Controls 2.3
|
2021-12-01 01:02:52 +01:00
|
|
|
|
2022-03-11 15:44:08 +01:00
|
|
|
import "wizard"
|
|
|
|
|
|
2021-12-01 01:02:52 +01:00
|
|
|
Wizard {
|
|
|
|
|
id: serverconnectwizard
|
|
|
|
|
|
2022-11-16 12:12:43 +01:00
|
|
|
wizardTitle: qsTr('Network configuration')
|
2021-12-01 01:02:52 +01:00
|
|
|
|
|
|
|
|
enter: null // disable transition
|
|
|
|
|
|
2022-10-04 19:47:29 +02:00
|
|
|
wiz: Daemon.serverConnectWizard
|
|
|
|
|
|
2021-12-01 01:02:52 +01:00
|
|
|
onAccepted: {
|
|
|
|
|
var proxy = wizard_data['proxy']
|
|
|
|
|
if (proxy && proxy['enabled'] == true) {
|
|
|
|
|
Network.proxy = proxy
|
|
|
|
|
} else {
|
|
|
|
|
Network.proxy = {'enabled': false}
|
|
|
|
|
}
|
|
|
|
|
Config.autoConnect = wizard_data['autoconnect']
|
|
|
|
|
if (!wizard_data['autoconnect']) {
|
|
|
|
|
Network.server = wizard_data['server']
|
2023-01-04 10:32:27 +01:00
|
|
|
Config.serverString = wizard_data['server']
|
2021-12-01 01:02:52 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
2022-10-04 19:47:29 +02:00
|
|
|
var view = wiz.start_wizard()
|
|
|
|
|
_loadNextComponent(view)
|
2021-12-01 01:02:52 +01:00
|
|
|
}
|
|
|
|
|
}
|