mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add action item for removing a passkey from entry (#10777)
This commit is contained in:
@@ -1428,6 +1428,22 @@ void DatabaseWidget::showImportPasskeyDialog(bool isEntry)
|
||||
passkeyImporter.importPasskey(m_db);
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::removePasskeyFromEntry()
|
||||
{
|
||||
auto currentEntry = currentSelectedEntry();
|
||||
if (!currentEntry) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto result = MessageBox::question(this,
|
||||
tr("Remove passkey from entry"),
|
||||
tr("Do you want to remove the passkey from this entry?"),
|
||||
MessageBox::Remove | MessageBox::Cancel);
|
||||
if (result == MessageBox::Remove) {
|
||||
currentEntry->removePasskey();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void DatabaseWidget::performUnlockDatabase(const QString& password, const QString& keyfile)
|
||||
@@ -2020,6 +2036,14 @@ bool DatabaseWidget::currentEntryHasSshKey()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_XC_BROWSER_PASSKEYS
|
||||
bool DatabaseWidget::currentEntryHasPasskey()
|
||||
{
|
||||
auto currentEntry = m_entryView->currentEntry();
|
||||
return currentEntry && currentEntry->hasPasskey();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool DatabaseWidget::currentEntryHasNotes()
|
||||
{
|
||||
auto currentEntry = currentSelectedEntry();
|
||||
|
||||
Reference in New Issue
Block a user