mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-14 18:11:33 +03:00
a4a7b63f21
Change behaviour so that only double-click copies touch credentials, and manual generate action only generates them.
31 lines
584 B
QML
31 lines
584 B
QML
import QtQuick 2.5
|
|
import QtQuick.Controls 1.4
|
|
|
|
Menu {
|
|
|
|
property var credential
|
|
property bool showGenerate
|
|
property bool enableGenerate
|
|
|
|
MenuItem {
|
|
text: qsTr("\&Copy to clipboard")
|
|
enabled: (credential != null) && (credential.code != null)
|
|
onTriggered: copy()
|
|
}
|
|
|
|
MenuItem {
|
|
visible: showGenerate
|
|
enabled: enableGenerate
|
|
text: qsTr("Generate code")
|
|
onTriggered: generate(false)
|
|
}
|
|
|
|
MenuSeparator {
|
|
}
|
|
|
|
MenuItem {
|
|
text: qsTr("Delete")
|
|
onTriggered: deleteCredential()
|
|
}
|
|
}
|