mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
Disable Servers settings item when no server has been set
Fix the logic of *Add Server* to comeback to start page instead of push when no server is set
This commit is contained in:
@@ -120,6 +120,7 @@ PageBase {
|
||||
Layout.preferredHeight: 30
|
||||
icon.source: "qrc:/images/svg/format_list_bulleted_black_24dp.svg"
|
||||
text: qsTr("Servers")
|
||||
enabled: GeneralSettingsLogic.existsAnyServer
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.ServersList)
|
||||
}
|
||||
@@ -137,7 +138,12 @@ PageBase {
|
||||
icon.source: "qrc:/images/svg/control_point_black_24dp.svg"
|
||||
text: qsTr("Add server")
|
||||
onClicked: {
|
||||
if(GeneralSettingsLogic.existsAnyServer)
|
||||
// If there is any server set we will go to Start Page
|
||||
UiLogic.goToPage(PageEnum.Start)
|
||||
else
|
||||
// Else just come back to start page
|
||||
UiLogic.closePage()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user