added selection of default server and container on the sharing page
This commit is contained in:
parent
5dc3b64e0b
commit
3084892ed8
2 changed files with 9 additions and 6 deletions
|
@ -113,6 +113,8 @@ QString OpenVpnConfigurator::genOpenVpnConfig(const ServerCredentials &credentia
|
||||||
QJsonObject jConfig;
|
QJsonObject jConfig;
|
||||||
jConfig[config_key::config] = config;
|
jConfig[config_key::config] = config;
|
||||||
|
|
||||||
|
clientId = connData.clientId;
|
||||||
|
|
||||||
return QJsonDocument(jConfig).toJson();
|
return QJsonDocument(jConfig).toJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ PageType {
|
||||||
id: serverSelector
|
id: serverSelector
|
||||||
|
|
||||||
signal severSelectorIndexChanged
|
signal severSelectorIndexChanged
|
||||||
property int currentIndex: 0
|
property int currentIndex: -1
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
|
@ -269,8 +269,6 @@ PageType {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
currentIndex: 0
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
handler()
|
handler()
|
||||||
|
|
||||||
|
@ -283,8 +281,9 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
handler()
|
serverSelectorListView.currentIndex = ServersModel.isDefaultServerHasWriteAccess() ?
|
||||||
serverSelector.severSelectorIndexChanged()
|
proxyServersModel.mapFromSource(ServersModel.defaultIndex) : 0
|
||||||
|
serverSelectorListView.triggerCurrentItem()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handler() {
|
function handler() {
|
||||||
|
@ -329,6 +328,8 @@ PageType {
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
|
protocolSelectorListView.currentItem.y
|
||||||
|
|
||||||
handler()
|
handler()
|
||||||
|
|
||||||
protocolSelector.menuVisible = false
|
protocolSelector.menuVisible = false
|
||||||
|
@ -338,7 +339,7 @@ PageType {
|
||||||
target: serverSelector
|
target: serverSelector
|
||||||
|
|
||||||
function onSeverSelectorIndexChanged() {
|
function onSeverSelectorIndexChanged() {
|
||||||
protocolSelectorListView.currentIndex = 0
|
protocolSelectorListView.currentIndex = proxyContainersModel.mapFromSource(ContainersModel.getDefaultContainer())
|
||||||
protocolSelectorListView.triggerCurrentItem()
|
protocolSelectorListView.triggerCurrentItem()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue