diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts index e1a6542ab..4427ca488 100644 --- a/share/translations/keepassxc_en.ts +++ b/share/translations/keepassxc_en.ts @@ -843,10 +843,6 @@ Please select the correct database for saving credentials. BrowserPasskeysConfirmationDialog - - KeePassXC: Passkey credentials - - Cancel @@ -878,10 +874,6 @@ Please select the correct database for saving credentials. Do you want to register Passkey for: - - %1 (%2) - - Existing Passkey found. Do you want to register a new Passkey for: @@ -895,23 +887,27 @@ Do you want to register a new Passkey for: Authenticate Passkey credentials for: + + Relying Party: %1 + + + + Username: %1 + + + + KeePassXC - Passkey credentials + + BrowserService - - KeePassXC: Create a new group - - A request for creating a new group "%1" has been received. Do you want to create this group? - - KeePassXC: New key association request - - You have received an association request for the following database: %1 @@ -924,27 +920,15 @@ chrome-laptop. Save and allow access - - KeePassXC: Overwrite existing key? - - A shared encryption key with the name "%1" already exists. Do you want to overwrite it? - - KeePassXC: Update Entry - - Do you want to update the information in %1 - %2? - - KeePassXC: Delete entry - - A request for deleting entry "%1" has been received. Do you want to delete the entry? @@ -956,12 +940,32 @@ Do you want to delete the entry? - KeePassXC: Update Passkey + Entry already has a Passkey. +Do you want to overwrite the Passkey in %1 - %2? - Entry already has a Passkey. -Do you want to overwrite the Passkey in %1 - %2? + KeePassXC - Create a new group + + + + KeePassXC - New key association request + + + + KeePassXC - Overwrite existing key? + + + + KeePassXC - Update Passkey + + + + KeePassXC - Update Entry + + + + KeePassXC - Delete entry @@ -1796,18 +1800,10 @@ This may prevent connection to the browser plugin. This may prevent connection to the browser plugin. - - KeePassXC: No keys found - - No shared encryption keys found in KeePassXC settings. - - KeePassXC: Removed keys from database - - Successfully removed %n encryption key(s) from KeePassXC settings. @@ -1828,10 +1824,6 @@ Permissions to access entries will be revoked. Abort - - KeePassXC: Removed permissions - - Successfully removed permissions from %n entry(s). @@ -1839,10 +1831,6 @@ Permissions to access entries will be revoked. - - KeePassXC: No entry with permissions found! - - The active database does not contain an entry with permissions. @@ -1865,6 +1853,22 @@ This is necessary to maintain compatibility with the browser plugin. This is only necessary if your database is a copy of another and the browser extension cannot connect. + + No keys found + + + + Removed keys from database + + + + Removed permissions + + + + No entry with permissions found! + + DatabaseSettingsWidgetDatabaseKey @@ -6026,10 +6030,6 @@ Do you want to overwrite it? KeePassXC - Passkey Import - - URL: %1 - - Username: %1 @@ -6074,6 +6074,10 @@ Do you want to overwrite it? Default Passkeys group (Imported Passkeys) + + Relying Party: %1 + + PasskeyImporter diff --git a/src/browser/BrowserPasskeysConfirmationDialog.cpp b/src/browser/BrowserPasskeysConfirmationDialog.cpp index af62488f1..644bec599 100644 --- a/src/browser/BrowserPasskeysConfirmationDialog.cpp +++ b/src/browser/BrowserPasskeysConfirmationDialog.cpp @@ -33,6 +33,7 @@ BrowserPasskeysConfirmationDialog::BrowserPasskeysConfirmationDialog(QWidget* pa m_ui->setupUi(this); m_ui->updateButton->setVisible(false); + m_ui->verticalLayout->setAlignment(Qt::AlignTop); connect(m_ui->credentialsTable, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(accept())); connect(m_ui->confirmButton, SIGNAL(clicked()), SLOT(accept())); @@ -48,12 +49,13 @@ BrowserPasskeysConfirmationDialog::~BrowserPasskeysConfirmationDialog() } void BrowserPasskeysConfirmationDialog::registerCredential(const QString& username, - const QString& siteId, + const QString& relyingParty, const QList& existingEntries, int timeout) { m_ui->firstLabel->setText(tr("Do you want to register Passkey for:")); - m_ui->dataLabel->setText(tr("%1 (%2)").arg(username, siteId)); + m_ui->relyingPartyLabel->setText(tr("Relying Party: %1").arg(relyingParty)); + m_ui->usernameLabel->setText(tr("Username: %1").arg(username)); m_ui->secondLabel->setText(""); if (!existingEntries.isEmpty()) { @@ -64,6 +66,7 @@ void BrowserPasskeysConfirmationDialog::registerCredential(const QString& userna m_ui->confirmButton->setText(tr("Register new")); updateEntriesToTable(existingEntries); } else { + m_ui->verticalLayout->setSizeConstraint(QLayout::SetFixedSize); m_ui->confirmButton->setText(tr("Register")); m_ui->credentialsTable->setVisible(false); } @@ -72,11 +75,12 @@ void BrowserPasskeysConfirmationDialog::registerCredential(const QString& userna } void BrowserPasskeysConfirmationDialog::authenticateCredential(const QList& entries, - const QString& origin, + const QString& relyingParty, int timeout) { m_ui->firstLabel->setText(tr("Authenticate Passkey credentials for:")); - m_ui->dataLabel->setText(origin); + m_ui->relyingPartyLabel->setText(tr("Relying Party: %1").arg(relyingParty)); + m_ui->usernameLabel->setVisible(false); m_ui->secondLabel->setText(""); updateEntriesToTable(entries); startCounter(timeout); diff --git a/src/browser/BrowserPasskeysConfirmationDialog.h b/src/browser/BrowserPasskeysConfirmationDialog.h index 189c066a5..6e262ffda 100644 --- a/src/browser/BrowserPasskeysConfirmationDialog.h +++ b/src/browser/BrowserPasskeysConfirmationDialog.h @@ -38,10 +38,10 @@ public: ~BrowserPasskeysConfirmationDialog() override; void registerCredential(const QString& username, - const QString& siteId, + const QString& relyingParty, const QList& existingEntries, int timeout); - void authenticateCredential(const QList& entries, const QString& origin, int timeout); + void authenticateCredential(const QList& entries, const QString& relyingParty, int timeout); Entry* getSelectedEntry() const; bool isPasskeyUpdated() const; diff --git a/src/browser/BrowserPasskeysConfirmationDialog.ui b/src/browser/BrowserPasskeysConfirmationDialog.ui index 5b566d725..2d8fee547 100755 --- a/src/browser/BrowserPasskeysConfirmationDialog.ui +++ b/src/browser/BrowserPasskeysConfirmationDialog.ui @@ -6,69 +6,73 @@ 0 0 - 405 - 282 + 400 + 274 - + 0 0 - KeePassXC: Passkey credentials + KeePassXC - Passkey credentials - - - - true - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::PlainText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - true - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 10 - - - + + + + + + true + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Relying Party: %1 + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Username: %1 + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + true + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp index 6344e1dbb..484a9d21e 100644 --- a/src/browser/BrowserService.cpp +++ b/src/browser/BrowserService.cpp @@ -248,7 +248,7 @@ QJsonObject BrowserService::createNewGroup(const QString& groupName) } auto dialogResult = MessageBox::warning(m_currentDatabaseWidget, - tr("KeePassXC: Create a new group"), + tr("KeePassXC - Create a new group"), tr("A request for creating a new group \"%1\" has been received.\n" "Do you want to create this group?\n") .arg(groupName), @@ -512,7 +512,7 @@ QString BrowserService::storeKey(const QString& key) do { QInputDialog keyDialog(m_currentDatabaseWidget); connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject())); - keyDialog.setWindowTitle(tr("KeePassXC: New key association request")); + keyDialog.setWindowTitle(tr("KeePassXC - New key association request")); keyDialog.setLabelText(tr("You have received an association request for the following database:\n%1\n\n" "Give the connection a unique name or ID, for example:\nchrome-laptop.") .arg(db->metadata()->name().toHtmlEscaped())); @@ -534,7 +534,7 @@ QString BrowserService::storeKey(const QString& key) contains = db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + id); if (contains) { dialogResult = MessageBox::warning(m_currentDatabaseWidget, - tr("KeePassXC: Overwrite existing key?"), + tr("KeePassXC - Overwrite existing key?"), tr("A shared encryption key with the name \"%1\" " "already exists.\nDo you want to overwrite it?") .arg(id), @@ -665,7 +665,7 @@ QJsonObject BrowserService::showPasskeysAuthenticationPrompt(const QJsonObject& raiseWindow(); BrowserPasskeysConfirmationDialog confirmDialog; - confirmDialog.authenticateCredential(entries, origin, timeout); + confirmDialog.authenticateCredential(entries, rpId, timeout); auto dialogResult = confirmDialog.exec(); if (dialogResult == QDialog::Accepted) { hideWindow(); @@ -729,7 +729,7 @@ void BrowserService::addPasskeyToEntry(Entry* entry, if (entry->hasPasskey()) { if (MessageBox::question( m_currentDatabaseWidget, - tr("KeePassXC: Update Passkey"), + tr("KeePassXC - Update Passkey"), tr("Entry already has a Passkey.\nDo you want to overwrite the Passkey in %1 - %2?") .arg(entry->title(), entry->attributes()->value(BrowserPasskeys::KPEX_PASSKEY_USERNAME)), MessageBox::Overwrite | MessageBox::Cancel, @@ -840,8 +840,8 @@ bool BrowserService::updateEntry(const EntryParameters& entryParameters, const Q MessageBox::Button dialogResult = MessageBox::No; if (!browserSettings()->alwaysAllowUpdate()) { raiseWindow(); - dialogResult = MessageBox::question(nullptr, - tr("KeePassXC: Update Entry"), + dialogResult = MessageBox::question(m_currentDatabaseWidget, + tr("KeePassXC - Update Entry"), tr("Do you want to update the information in %1 - %2?") .arg(QUrl(entryParameters.siteUrl).host(), username), MessageBox::Save | MessageBox::Cancel, @@ -878,7 +878,7 @@ bool BrowserService::deleteEntry(const QString& uuid) } auto dialogResult = MessageBox::warning(m_currentDatabaseWidget, - tr("KeePassXC: Delete entry"), + tr("KeePassXC - Delete entry"), tr("A request for deleting entry \"%1\" has been received.\n" "Do you want to delete the entry?\n") .arg(entry->title()), diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp index aa91fa451..aaa2aff6e 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp @@ -178,10 +178,8 @@ void DatabaseSettingsWidgetBrowser::removeSharedEncryptionKeys() } if (keysToRemove.isEmpty()) { - MessageBox::information(this, - tr("KeePassXC: No keys found"), - tr("No shared encryption keys found in KeePassXC settings."), - MessageBox::Ok); + MessageBox::information( + this, tr("No keys found"), tr("No shared encryption keys found in KeePassXC settings."), MessageBox::Ok); return; } @@ -191,7 +189,7 @@ void DatabaseSettingsWidgetBrowser::removeSharedEncryptionKeys() const int count = keysToRemove.count(); MessageBox::information(this, - tr("KeePassXC: Removed keys from database"), + tr("Removed keys from database"), tr("Successfully removed %n encryption key(s) from KeePassXC settings.", "", count), MessageBox::Ok); } @@ -231,12 +229,12 @@ void DatabaseSettingsWidgetBrowser::removeStoredPermissions() if (counter > 0) { MessageBox::information(this, - tr("KeePassXC: Removed permissions"), + tr("Removed permissions"), tr("Successfully removed permissions from %n entry(s).", "", counter), MessageBox::Ok); } else { MessageBox::information(this, - tr("KeePassXC: No entry with permissions found!"), + tr("No entry with permissions found!"), tr("The active database does not contain an entry with permissions."), MessageBox::Ok); } diff --git a/src/gui/passkeys/PasskeyExportDialog.ui b/src/gui/passkeys/PasskeyExportDialog.ui index 4d4d7f5db..c974ebaac 100755 --- a/src/gui/passkeys/PasskeyExportDialog.ui +++ b/src/gui/passkeys/PasskeyExportDialog.ui @@ -86,6 +86,16 @@ + + + + Cancel + + + true + + + @@ -102,16 +112,6 @@ - - - - Cancel - - - true - - - diff --git a/src/gui/passkeys/PasskeyImportDialog.cpp b/src/gui/passkeys/PasskeyImportDialog.cpp index 0c1c31e6d..2762df510 100644 --- a/src/gui/passkeys/PasskeyImportDialog.cpp +++ b/src/gui/passkeys/PasskeyImportDialog.cpp @@ -45,12 +45,12 @@ PasskeyImportDialog::~PasskeyImportDialog() { } -void PasskeyImportDialog::setInfo(const QString& url, +void PasskeyImportDialog::setInfo(const QString& relyingParty, const QString& username, const QSharedPointer& database, bool isEntry) { - m_ui->urlLabel->setText(tr("URL: %1").arg(url)); + m_ui->relyingPartyLabel->setText(tr("Relying Party: %1").arg(relyingParty)); m_ui->usernameLabel->setText(tr("Username: %1").arg(username)); if (isEntry) { diff --git a/src/gui/passkeys/PasskeyImportDialog.h b/src/gui/passkeys/PasskeyImportDialog.h index 705c6d187..9a7c4437c 100644 --- a/src/gui/passkeys/PasskeyImportDialog.h +++ b/src/gui/passkeys/PasskeyImportDialog.h @@ -36,7 +36,10 @@ public: explicit PasskeyImportDialog(QWidget* parent = nullptr); ~PasskeyImportDialog() override; - void setInfo(const QString& url, const QString& username, const QSharedPointer& database, bool isEntry); + void setInfo(const QString& relyingParty, + const QString& username, + const QSharedPointer& database, + bool isEntry); QSharedPointer getSelectedDatabase() const; QUuid getSelectedEntryUuid() const; QUuid getSelectedGroupUuid() const; diff --git a/src/gui/passkeys/PasskeyImportDialog.ui b/src/gui/passkeys/PasskeyImportDialog.ui index ec8de7e06..ecca97b14 100755 --- a/src/gui/passkeys/PasskeyImportDialog.ui +++ b/src/gui/passkeys/PasskeyImportDialog.ui @@ -44,9 +44,12 @@ - + - URL: %1 + Relying Party: %1 + + + Qt::PlainText Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -58,24 +61,14 @@ Username: %1 + + Qt::PlainText + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - Qt::Vertical - - - - 20 - 10 - - - - @@ -118,6 +111,19 @@ + + + + Qt::Vertical + + + + 20 + 10 + + + + @@ -133,6 +139,16 @@ + + + + Cancel + + + true + + + @@ -149,16 +165,6 @@ - - - - Cancel - - - true - - -