From ba0fc3b886e9365f884cf8a4265ba0c2c13b20b4 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 1 Oct 2024 09:36:05 -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 | 44 ++++++++----------- 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, 41 insertions(+), 59 deletions(-) diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts index 2ef44aa50..cbfda0636 100644 --- a/share/translations/keepassxc_en.ts +++ b/share/translations/keepassxc_en.ts @@ -282,25 +282,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 @@ -507,6 +488,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 + + ApplicationSettingsWidgetSecurity @@ -6788,10 +6782,6 @@ The following data is missing: Also choose from: - - Excluded characters: "0", "1", "l", "I", "O", "|", "﹒" - - Exclude look-alike characters @@ -6949,6 +6939,10 @@ Do you want to overwrite it? Characters: %1 + + Excluded characters: "0", "1", "l", "I", "O", "|", "﹒", "B", "8", "G", "6" + + PasswordWidget @@ -10136,11 +10130,11 @@ Example: JBSWY3DPEHPK3PXP - <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://docs.yubico.com/yesdk/users-manual/application-otp/challenge-response.html">HMAC-SHA1 Challenge-Response</a>.</p> + 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> diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui index 2e38ee2c8..1af95e5ea 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 3b6eb4f3f..5d45b3531 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -253,6 +253,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)); @@ -497,6 +498,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); @@ -511,6 +513,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 031a79bf8..d4215bd34 100644 --- a/src/gui/databasekey/YubiKeyEditWidget.cpp +++ b/src/gui/databasekey/YubiKeyEditWidget.cpp @@ -139,9 +139,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 ebd5f0402..a74b20ead 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp @@ -78,7 +78,6 @@ void DatabaseSettingsWidgetDatabaseKey::loadSettings(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 {