mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 14:04:55 +03:00
Disable menu items when no key present
This commit is contained in:
parent
839f9a10e0
commit
735420632c
@ -47,6 +47,7 @@ ApplicationWindow {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr('Add credential...')
|
||||
enabled: device.hasDevice
|
||||
onTriggered: {
|
||||
if (settings.slotMode) {
|
||||
addCredentialSlot.clear()
|
||||
@ -60,12 +61,12 @@ ApplicationWindow {
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr('Set password...')
|
||||
enabled: !settings.slotMode
|
||||
enabled: !settings.slotMode && device.hasDevice
|
||||
onTriggered: setPassword.open()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr('Reset...')
|
||||
enabled: !settings.slotMode
|
||||
enabled: !settings.slotMode && device.hasDevice
|
||||
onTriggered: reset.open()
|
||||
}
|
||||
MenuItem {
|
||||
|
Loading…
Reference in New Issue
Block a user