yubioath-flutter/qml/CredentialMenu.qml

31 lines
584 B
QML
Raw Normal View History

2017-03-17 13:01:59 +03:00
import QtQuick 2.5
import QtQuick.Controls 1.4
Menu {
property var credential
property bool showGenerate
property bool enableGenerate
MenuItem {
2017-07-05 15:32:56 +03:00
text: qsTr("\&Copy to clipboard")
2017-03-17 13:01:59 +03:00
enabled: (credential != null) && (credential.code != null)
onTriggered: copy()
}
MenuItem {
visible: showGenerate
enabled: enableGenerate
text: qsTr("Generate code")
onTriggered: generate(false)
2017-03-17 13:01:59 +03:00
}
MenuSeparator {
}
2017-03-17 13:01:59 +03:00
MenuItem {
text: qsTr("Delete")
2017-03-17 13:01:59 +03:00
onTriggered: deleteCredential()
}
}