mobile/dive-details: add option to toggle the invalid flag

Simply for consistency with the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-31 09:58:43 -07:00
parent 9dd01da9c1
commit 4982751bbe

View file

@ -92,6 +92,11 @@ Kirigami.Page {
enabled: currentItem && currentItem.modelData && !currentItem.modelData.isTrip && currentItem.modelData.isTopLevel
onTriggered: manager.addTripForDive(currentItem.modelData.id)
}
property QtObject toggleInvalidAction: Kirigami.Action {
text: currentItem && currentItem.modelData && currentItem.modelData.isInvalid ? qsTr("Mark dive as valid") : qsTr("Mark dive as invalid")
visible: currentItem && currentItem.modelData
onTriggered: manager.toggleDiveInvalid(currentItem.modelData.id)
}
property QtObject undoAction: Kirigami.Action {
text: qsTr("Undo") + " " + manager.undoText
icon { name: ":/icons/undo.svg" }