mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
* feat: added 'clear site list' button (#1747) * chore: rename 'Export/Import Sites' to 'Additional options' --------- Co-authored-by: MrMirDan <58086007+MrMirDan@users.noreply.github.com>
This commit is contained in:
@@ -308,7 +308,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: 16
|
||||
|
||||
headerText: qsTr("Import / Export Sites")
|
||||
headerText: qsTr("Additional options")
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
@@ -351,6 +351,34 @@ PageType {
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
|
||||
LabelWithButtonType {
|
||||
id: clearSitesButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Clear site list")
|
||||
rightImageSource: "qrc:/images/controls/trash.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
var headerText = qsTr("Clear site list?")
|
||||
var descriptionText = qsTr("All sites will be removed from list.")
|
||||
var yesButtonText = qsTr("Continue")
|
||||
var noButtonText = qsTr("Cancel")
|
||||
|
||||
var yesButtonFunction = function() {
|
||||
PageController.showBusyIndicator(true)
|
||||
SitesController.removeSites()
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
var noButtonFunction = function() {
|
||||
|
||||
}
|
||||
|
||||
showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user