mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 14:04:55 +03:00
Add some keyboard shortcuts
This commit is contained in:
parent
dfb445b66b
commit
75afc6f7dc
12
qml/Main.qml
12
qml/Main.qml
@ -119,16 +119,24 @@ ApplicationWindow {
|
||||
id: credentialMenu
|
||||
MenuItem {
|
||||
text: qsTr('Copy')
|
||||
onTriggered: clipboard.setClipboard(selectedCredential.code)
|
||||
shortcut: StandardKey.Copy
|
||||
onTriggered: {
|
||||
if (selectedCredential != null) {
|
||||
clipboard.setClipboard(selectedCredential.code)
|
||||
}
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
visible: selectedCredential != null
|
||||
&& selectedCredential.code == null
|
||||
&& (selectedCredential.oath_type === "hotp"
|
||||
|| selectedCredential.touch === true)
|
||||
text: qsTr('Generate code')
|
||||
shortcut: "Space"
|
||||
onTriggered: calculateCredential(selectedCredential)
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr('Delete')
|
||||
shortcut: StandardKey.Delete
|
||||
onTriggered: confirmDeleteCredential.open()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user