mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-23 12:59:44 +00:00
ea91cd605f
fixes #11689
70 lines
1.9 KiB
QML
70 lines
1.9 KiB
QML
import QtQuick 2.15
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Popups 0.1
|
|
|
|
import utils 1.0
|
|
|
|
StatusMenu {
|
|
id: root
|
|
|
|
property var keyPair
|
|
|
|
signal runRenameKeypairFlow()
|
|
signal runRemoveKeypairFlow()
|
|
|
|
QtObject {
|
|
id: d
|
|
readonly property bool isProfileKeypair: keyPair.pairType === Constants.keycard.keyPairType.profile
|
|
}
|
|
|
|
StatusAction {
|
|
text: enabled? qsTr("Show encrypted QR of keypairs on device") : ""
|
|
enabled: !d.isProfileKeypair &&
|
|
!keyPair.migratedToKeycard &&
|
|
!keyPair.operability === Constants.keypair.operability.nonOperable
|
|
icon.name: "qr"
|
|
icon.color: Theme.palette.primaryColor1
|
|
onTriggered: {
|
|
console.warn("TODO: show encrypted QR")
|
|
}
|
|
}
|
|
|
|
StatusAction {
|
|
text: keyPair.migratedToKeycard? qsTr("Stop using Keycard") : qsTr("Move keys to a Keycard")
|
|
icon.name: keyPair.migratedToKeycard? "keycard-crossed" : "keycard"
|
|
icon.color: Theme.palette.primaryColor1
|
|
onTriggered: {
|
|
if (keyPair.migratedToKeycard)
|
|
console.warn("TODO: stop using Keycard")
|
|
else
|
|
console.warn("TODO: move keys to a Keycard")
|
|
}
|
|
}
|
|
|
|
StatusAction {
|
|
text: enabled? qsTr("Rename keypair") : ""
|
|
enabled: !d.isProfileKeypair
|
|
icon.name: "edit"
|
|
icon.color: Theme.palette.primaryColor1
|
|
onTriggered: {
|
|
root.runRenameKeypairFlow()
|
|
}
|
|
}
|
|
|
|
StatusMenuSeparator {
|
|
visible: !d.isProfileKeypair
|
|
}
|
|
|
|
StatusAction {
|
|
text: enabled? qsTr("Remove keypair and associated accounts") : ""
|
|
enabled: !d.isProfileKeypair
|
|
type: StatusAction.Type.Danger
|
|
icon.name: "delete"
|
|
icon.color: Theme.palette.dangerColor1
|
|
onTriggered: {
|
|
root.runRemoveKeypairFlow()
|
|
}
|
|
}
|
|
}
|