Added popup to confirm actions "Clear server from Amnesia software" and "Forget this server"

This commit is contained in:
vladimir.kuznetsov 2023-01-27 10:25:14 +03:00
parent ee609f3e8f
commit 051a2a3ef2
4 changed files with 85 additions and 4 deletions

View file

@ -93,24 +93,49 @@ PageBase {
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearServer()
onClicked: {
popupClearServer.open()
}
}
PopupWithQuestion {
id: popupClearServer
questionText: "Attention! All containers will be deleted on the server. This means that configuration files, keys and certificates will be deleted. Continue?"
yesFunc: function() {
ServerSettingsLogic.onPushButtonClearServer()
close()
}
noFunc: function() {
close()
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: qsTr("Forget this server")
onClicked: {
ServerSettingsLogic.onPushButtonForgetServer()
popupForgetServer.open()
}
}
PopupWithQuestion {
id: popupForgetServer
questionText: "Attention! Something will happen. Continue?"
yesFunc: function() {
ServerSettingsLogic.onPushButtonForgetServer()
close()
}
noFunc: function() {
close()
}
}
}
}