mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Only display domain name in browser access confirm dialog
* Prevents dialog from growing in width if there is a really long url requesting access.
This commit is contained in:
parent
60317ffadd
commit
51f3014028
@ -37,9 +37,11 @@ BrowserAccessControlDialog::~BrowserAccessControlDialog()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserAccessControlDialog::setItems(const QList<Entry*>& items, const QString& hostname, bool httpAuth)
|
void BrowserAccessControlDialog::setItems(const QList<Entry*>& items, const QString& urlString, bool httpAuth)
|
||||||
{
|
{
|
||||||
m_ui->siteLabel->setText(m_ui->siteLabel->text().arg(hostname));
|
QUrl url(urlString);
|
||||||
|
m_ui->siteLabel->setText(m_ui->siteLabel->text().arg(
|
||||||
|
url.toDisplayString(QUrl::RemoveUserInfo | QUrl::RemovePath | QUrl::RemoveQuery | QUrl::RemoveFragment)));
|
||||||
|
|
||||||
m_ui->rememberDecisionCheckBox->setVisible(!httpAuth);
|
m_ui->rememberDecisionCheckBox->setVisible(!httpAuth);
|
||||||
m_ui->rememberDecisionCheckBox->setChecked(false);
|
m_ui->rememberDecisionCheckBox->setChecked(false);
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
explicit BrowserAccessControlDialog(QWidget* parent = nullptr);
|
explicit BrowserAccessControlDialog(QWidget* parent = nullptr);
|
||||||
~BrowserAccessControlDialog() override;
|
~BrowserAccessControlDialog() override;
|
||||||
|
|
||||||
void setItems(const QList<Entry*>& items, const QString& hostname, bool httpAuth);
|
void setItems(const QList<Entry*>& items, const QString& urlString, bool httpAuth);
|
||||||
bool remember() const;
|
bool remember() const;
|
||||||
|
|
||||||
QList<QTableWidgetItem*> getSelectedEntries() const;
|
QList<QTableWidgetItem*> getSelectedEntries() const;
|
||||||
|
@ -776,7 +776,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& pwEntriesToConfirm,
|
|||||||
config.save(entry);
|
config.save(entry);
|
||||||
});
|
});
|
||||||
|
|
||||||
accessControlDialog.setItems(pwEntriesToConfirm, !submitHost.isEmpty() ? submitHost : url, httpAuth);
|
accessControlDialog.setItems(pwEntriesToConfirm, url, httpAuth);
|
||||||
|
|
||||||
QList<Entry*> allowedEntries;
|
QList<Entry*> allowedEntries;
|
||||||
if (accessControlDialog.exec() == QDialog::Accepted) {
|
if (accessControlDialog.exec() == QDialog::Accepted) {
|
||||||
|
Loading…
Reference in New Issue
Block a user