added confirmation dialog when clearing logs and notification after clearing
This commit is contained in:
parent
7539afa91e
commit
c271235d16
1 changed files with 22 additions and 2 deletions
|
@ -4,9 +4,9 @@ import QtQuick.Layouts
|
||||||
|
|
||||||
import PageEnum 1.0
|
import PageEnum 1.0
|
||||||
|
|
||||||
import "./"
|
|
||||||
import "../Controls2"
|
import "../Controls2"
|
||||||
import "../Config"
|
import "../Config"
|
||||||
|
import "../Components"
|
||||||
import "../Controls2/TextTypes"
|
import "../Controls2/TextTypes"
|
||||||
|
|
||||||
PageType {
|
PageType {
|
||||||
|
@ -121,7 +121,23 @@ PageType {
|
||||||
|
|
||||||
image: "qrc:/images/controls/delete.svg"
|
image: "qrc:/images/controls/delete.svg"
|
||||||
|
|
||||||
onClicked: SettingsController.clearLogs()
|
onClicked: function() {
|
||||||
|
questionDrawer.headerText = qsTr("Clear logs?")
|
||||||
|
questionDrawer.yesButtonText = qsTr("Continue")
|
||||||
|
questionDrawer.noButtonText = qsTr("Cancel")
|
||||||
|
|
||||||
|
questionDrawer.yesButtonFunction = function() {
|
||||||
|
questionDrawer.visible = false
|
||||||
|
PageController.showBusyIndicator(true)
|
||||||
|
SettingsController.clearLogs()
|
||||||
|
PageController.showBusyIndicator(false)
|
||||||
|
PageController.showNotificationMessage(qsTr("Logs have been cleaned up"))
|
||||||
|
}
|
||||||
|
questionDrawer.noButtonFunction = function() {
|
||||||
|
questionDrawer.visible = false
|
||||||
|
}
|
||||||
|
questionDrawer.visible = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CaptionTextType {
|
CaptionTextType {
|
||||||
|
@ -133,6 +149,10 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuestionDrawer {
|
||||||
|
id: questionDrawer
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue