From 94eb3ffa7aad6fc1f826096dbe5f900a8ed97218 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 7 Oct 2024 17:48:40 -0400 Subject: [PATCH] Minor UI fixes * Fixes #11044 - password generator excluded characters tooltip was incorrect * Fixes #11084 - allow more than 30 days for showing expiring passwords. Also fix the ability to properly translate this control. * Fixes #11212 - don't show password on creating new database * Fixes #10726 - improve indication of hardware key polling. Also improve layout spacing of unlock dialog. * Fixes #11142 - provide better link for challenge-response information --- share/translations/keepassxc_en.ts | 46 ++++++++----------- src/gui/ApplicationSettingsWidgetGeneral.ui | 16 ++----- src/gui/DatabaseOpenWidget.cpp | 3 ++ src/gui/DatabaseOpenWidget.ui | 25 +++------- src/gui/PasswordGeneratorWidget.ui | 5 +- src/gui/databasekey/YubiKeyEditWidget.cpp | 6 +-- .../DatabaseSettingsWidgetDatabaseKey.cpp | 1 - 7 files changed, 42 insertions(+), 60 deletions(-) diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts index 787eba384..658a3c538 100644 --- a/share/translations/keepassxc_en.ts +++ b/share/translations/keepassxc_en.ts @@ -278,25 +278,6 @@ Include beta releases when checking for updates - - On database unlock, show entries that - - - - have expired - On database unlock, show entries that... - - - - days - On database unlock, show entries that will expire within %1 days - - - - will expire within - On database unlock, show entries that... - - File Management @@ -499,6 +480,19 @@ Remember last typed entry for: + + On database unlock, show entries that will expire within + + + + On database unlock, show entries that will expire within + + + + days + number of days warning for password expiration + + recent files @@ -6613,7 +6607,7 @@ Do you want to overwrite it? - Excluded characters: "0", "1", "l", "I", "O", "|", "﹒" + Excluded characters: "0", "1", "l", "I", "O", "|", "﹒", "B", "8", "G", "6" @@ -9691,20 +9685,20 @@ Example: JBSWY3DPEHPK3PXP Challenge-Response set, click to change or remove - - <p>If you own a <a href="https://www.yubico.com/">YubiKey</a> or <a href="https://onlykey.io">OnlyKey</a>, you can use it for additional security.</p><p>The key requires one of its slots to be programmed as <a href="https://www.yubico.com/products/services-software/challenge-response/">HMAC-SHA1 Challenge-Response</a>.</p> - - Detecting hardware keys… - No hardware keys detected + Refresh hardware keys - Refresh hardware keys + <p>If you own a <a href="https://www.yubico.com/">YubiKey</a> or <a href="https://onlykey.io">OnlyKey</a>, you can use it for additional security.</p><p>The key requires one of its slots to be programmed with <a href="https://keepassxc.org/docs/#faq-yubikey-howto">Challenge-Response</a>.</p> + + + + No hardware keys detected diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui index 01215ce27..c3781a852 100644 --- a/src/gui/ApplicationSettingsWidgetGeneral.ui +++ b/src/gui/ApplicationSettingsWidgetGeneral.ui @@ -278,7 +278,7 @@ - On database unlock, show entries that + On database unlock, show entries that will expire within @@ -297,25 +297,19 @@ Qt::StrongFocus - On database unlock, show entries that - - - have expired + On database unlock, show entries that will expire within - days - - - will expire within + days 0 - 30 + 90 - 0 + 3 diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index 6eb5251b8..f4234b572 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -259,6 +259,7 @@ void DatabaseOpenWidget::clearForms() m_ui->keyFileLineEdit->setShowPassword(false); m_ui->keyFileLineEdit->setClearButtonEnabled(true); m_ui->hardwareKeyCombo->clear(); + toggleHardwareKeyComponent(false); toggleQuickUnlockScreen(); m_db.reset(new Database(m_filename)); @@ -523,6 +524,7 @@ void DatabaseOpenWidget::pollHardwareKey(bool manualTrigger) } m_ui->hardwareKeyCombo->setEnabled(false); + m_ui->useHardwareKeyCheckBox->setEnabled(false); m_ui->hardwareKeyProgress->setVisible(true); m_ui->refreshHardwareKeys->setEnabled(false); m_ui->noHardwareKeysFoundLabel->setVisible(false); @@ -537,6 +539,7 @@ void DatabaseOpenWidget::pollHardwareKey(bool manualTrigger) void DatabaseOpenWidget::hardwareKeyResponse(bool found) { + m_ui->useHardwareKeyCheckBox->setEnabled(true); m_ui->hardwareKeyProgress->setVisible(false); m_ui->refreshHardwareKeys->setEnabled(true); m_ui->hardwareKeyCombo->clear(); diff --git a/src/gui/DatabaseOpenWidget.ui b/src/gui/DatabaseOpenWidget.ui index 104ca1959..a045ba82c 100644 --- a/src/gui/DatabaseOpenWidget.ui +++ b/src/gui/DatabaseOpenWidget.ui @@ -59,6 +59,7 @@ 12 + 75 true @@ -143,7 +144,7 @@ 0 - 0 + 10 @@ -155,7 +156,7 @@ - 0 + 2 @@ -213,13 +214,13 @@ 0 - 10 + 0 0 - 15 + 10 @@ -362,7 +363,7 @@ 40 - 0 + 20 @@ -417,19 +418,6 @@ - - - - Qt::Vertical - - - - 0 - 5 - - - - @@ -511,6 +499,7 @@ 10 + 75 true diff --git a/src/gui/PasswordGeneratorWidget.ui b/src/gui/PasswordGeneratorWidget.ui index 9c06847e6..34dab2c36 100644 --- a/src/gui/PasswordGeneratorWidget.ui +++ b/src/gui/PasswordGeneratorWidget.ui @@ -716,7 +716,10 @@ QProgressBar::chunk { - Excluded characters: "0", "1", "l", "I", "O", "|", "﹒" + Excluded characters: "0", "1", "l", "I", "O", "|", "﹒", "B", "8", "G", "6" + + + Excluded characters: "0", "1", "l", "I", "O", "|", "﹒", "B", "8", "G", "6" Exclude look-alike characters diff --git a/src/gui/databasekey/YubiKeyEditWidget.cpp b/src/gui/databasekey/YubiKeyEditWidget.cpp index 857531f73..62ec750b4 100644 --- a/src/gui/databasekey/YubiKeyEditWidget.cpp +++ b/src/gui/databasekey/YubiKeyEditWidget.cpp @@ -141,9 +141,9 @@ void YubiKeyEditWidget::initComponent() m_ui->componentDescription->setText( tr("

If you own a YubiKey or " "OnlyKey, you can use it for additional security.

" - "

The key requires one of its slots to be programmed as " - "" - "HMAC-SHA1 Challenge-Response.

")); + "

The key requires one of its slots to be programmed with " + "" + "Challenge-Response.

")); } void YubiKeyEditWidget::pollYubikey() diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp index 268b3e827..ddf1e6bb6 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp @@ -86,7 +86,6 @@ void DatabaseSettingsWidgetDatabaseKey::load(QSharedPointer db) if (!m_db->key() || m_db->key()->keys().isEmpty()) { // database has no key, we are about to add a new one m_passwordEditWidget->changeVisiblePage(KeyComponentWidget::Page::Edit); - m_passwordEditWidget->setPasswordVisible(true); // Focus won't work until the UI settles QTimer::singleShot(0, m_passwordEditWidget, SLOT(setFocus())); } else {