mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-06 05:57:37 +03:00
Allow snap builds to use keepassxc-proxy
* Updated browser extension settings for snap usage * Support Snap 3.0 Changes * Add missing stage packages * Correct proxy communication with snaps
This commit is contained in:
parent
fb5746e4f7
commit
306bf0f292
4 changed files with 197 additions and 8 deletions
|
@ -32,13 +32,24 @@ BrowserOptionDialog::BrowserOptionDialog(QWidget* parent)
|
|||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
// clang-format off
|
||||
QString snapInstructions;
|
||||
#if defined(KEEPASSXC_DIST_SNAP)
|
||||
snapInstructions = "<br /><br />" +
|
||||
tr("Due to Snap sandboxing, you must run a script to enable browser integration."
|
||||
"<br />"
|
||||
"You can obtain this script from %1")
|
||||
.arg("<a href=\"https://keepassxc.org/download#linux\">https://keepassxc.org</a>");
|
||||
#endif
|
||||
|
||||
m_ui->extensionLabel->setOpenExternalLinks(true);
|
||||
m_ui->extensionLabel->setText(
|
||||
tr("KeePassXC-Browser is needed for the browser integration to work. <br />Download it for %1 and %2.")
|
||||
tr("KeePassXC-Browser is needed for the browser integration to work. <br />Download it for %1 and %2.%3")
|
||||
.arg("<a href=\"https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/\">Firefox</a>",
|
||||
"<a "
|
||||
"href=\"https://chrome.google.com/webstore/detail/keepassxc-browser/"
|
||||
"oboonakemofpalcgghocfoadofidjkkk\">Google Chrome / Chromium / Vivaldi</a>"));
|
||||
"<a href=\"https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk\">"
|
||||
"Google Chrome / Chromium / Vivaldi</a>",
|
||||
snapInstructions));
|
||||
// clang-format on
|
||||
|
||||
m_ui->scriptWarningWidget->setVisible(false);
|
||||
m_ui->scriptWarningWidget->setAutoHideTimeout(-1);
|
||||
|
@ -119,10 +130,18 @@ void BrowserOptionDialog::loadSettings()
|
|||
m_ui->supportBrowserProxy->setChecked(true);
|
||||
m_ui->supportBrowserProxy->setEnabled(false);
|
||||
#elif defined(KEEPASSXC_DIST_SNAP)
|
||||
m_ui->enableBrowserSupport->setChecked(false);
|
||||
m_ui->enableBrowserSupport->setEnabled(false);
|
||||
// Disable settings that will not work
|
||||
m_ui->supportBrowserProxy->setChecked(true);
|
||||
m_ui->supportBrowserProxy->setEnabled(false);
|
||||
m_ui->useCustomProxy->setChecked(false);
|
||||
m_ui->useCustomProxy->setEnabled(false);
|
||||
m_ui->browsersGroupBox->setVisible(false);
|
||||
m_ui->browsersGroupBox->setEnabled(false);
|
||||
m_ui->updateBinaryPath->setChecked(false);
|
||||
m_ui->updateBinaryPath->setEnabled(false);
|
||||
// Show notice to user
|
||||
m_ui->browserGlobalWarningWidget->showMessage(
|
||||
tr("We're sorry, but KeePassXC-Browser is not supported for Snap releases at the moment."),
|
||||
tr("Please see special instructions for browser extension use below"),
|
||||
MessageWidget::Warning);
|
||||
m_ui->browserGlobalWarningWidget->setCloseButtonVisible(false);
|
||||
m_ui->browserGlobalWarningWidget->setAutoHideTimeout(-1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue