Skip to content

Commit

Permalink
Add the error message about the slot on the Open Database page.
Browse files Browse the repository at this point in the history
Fixes #11543
  • Loading branch information
w15dev committed Jan 1, 2025
1 parent de84278 commit 5f144ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions share/translations/keepassxc_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,10 @@ Are you sure you want to continue with this file?.</source>
<source>&lt;a href=&quot;#&quot; style=&quot;text-decoration: underline&quot;&gt;I have a key file&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hardware keys found, but no slots are configured.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DatabaseSettingWidgetMetaData</name>
Expand Down
5 changes: 5 additions & 0 deletions src/gui/DatabaseOpenWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ void DatabaseOpenWidget::toggleHardwareKeyComponent(bool state)
m_ui->hardwareKeyProgress->setVisible(false);
m_ui->hardwareKeyComponent->setVisible(state);
m_ui->hardwareKeyCombo->setVisible(state && m_ui->hardwareKeyCombo->count() != 1);

m_ui->noHardwareKeysFoundLabel->setText(YubiKey::instance()->findConnectedKeys()
? tr("Hardware keys found, but no slots are configured.")
: tr("No hardware keys found."));

m_ui->noHardwareKeysFoundLabel->setVisible(!state && m_manualHardwareKeyRefresh);
if (!state) {
m_ui->useHardwareKeyCheckBox->setChecked(false);
Expand Down

0 comments on commit 5f144ae

Please sign in to comment.