Open TOTP setup dialog if entry has no valid TOTP set (#12584)

---------

Co-authored-by: x <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
This commit is contained in:
authored and Jonathan White committed 2025-11-01 10:17:52 -04:00
1 parent 17d58ecf1e
commit 7dfeb47212
2 files changed
+8 -1

No files matched your search

+7
View File
@@ -550,6 +550,13 @@ void DatabaseWidget::copyTotp()
if (!currentEntry) {
return;
}
// If the entry has no TOTP set, open the setup dialog first
if (!currentEntry->hasValidTotp()) {
setupTotp();
return;
}
setClipboardTextAndMinimize(currentEntry->totp());
}
+1 -1
View File
@@ -1027,7 +1027,7 @@ void MainWindow::updateMenuActionState()
m_ui->actionEntryAutoTypeTOTP->setVisible(singleEntrySelected && dbWidget->currentEntryHasTotp());
m_ui->actionEntryOpenUrl->setEnabled(singleEntryOrEditing && dbWidget->currentEntryHasUrl());
m_ui->actionEntryTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
m_ui->actionEntryCopyTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
m_ui->actionEntryCopyTotp->setEnabled(singleEntrySelected);
m_ui->actionEntryCopyPasswordTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
m_ui->actionEntrySetupTotp->setEnabled(singleEntrySelected);
m_ui->actionEntryTotpQRCode->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());