feat: added 'clear site list' button (#1747) (#1753)

* 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:
Nethius
2025-08-01 11:37:56 +08:00
committed by GitHub
parent 174e85a20a
commit 0531508a75
5 changed files with 48 additions and 1 deletions
@@ -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 {}
}
}