mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 13:07:38 +03:00
Add support for Microsoft Edge browser
This commit is contained in:
parent
9da07f2f66
commit
6cde2b83e8
7 changed files with 47 additions and 6 deletions
|
@ -29,7 +29,7 @@ so please check out your distribution's package list to see if KeePassXC is avai
|
||||||
- Using website favicons as entry icons
|
- Using website favicons as entry icons
|
||||||
- Merging of databases
|
- Merging of databases
|
||||||
- Automatic reload when the database changed on disk
|
- Automatic reload when the database changed on disk
|
||||||
- Browser integration with KeePassXC-Browser using [native messaging](https://developer.chrome.com/extensions/nativeMessaging) for [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) and [Google Chrome, Chromium, Vivaldi, or Brave](https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk)
|
- Browser integration with KeePassXC-Browser using [native messaging](https://developer.chrome.com/extensions/nativeMessaging) for [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) and [Google Chrome, Chromium, Vivaldi, or Brave](https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk) and [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/pdffhmdngciaglkoonimfcmckehcpafo)
|
||||||
- Synchronize passwords using KeeShare. See [Using Sharing](./docs/QUICKSTART.md#using-sharing) for more details.
|
- Synchronize passwords using KeeShare. See [Using Sharing](./docs/QUICKSTART.md#using-sharing) for more details.
|
||||||
- Many bug fixes
|
- Many bug fixes
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,11 @@ BrowserOptionDialog::BrowserOptionDialog(QWidget* parent)
|
||||||
|
|
||||||
m_ui->extensionLabel->setOpenExternalLinks(true);
|
m_ui->extensionLabel->setOpenExternalLinks(true);
|
||||||
m_ui->extensionLabel->setText(
|
m_ui->extensionLabel->setText(
|
||||||
tr("KeePassXC-Browser is needed for the browser integration to work. <br />Download it for %1 and %2. %3")
|
tr("KeePassXC-Browser is needed for the browser integration to work. <br />Download it for %1 and %2 and %3. %4")
|
||||||
.arg("<a href=\"https://addons.mozilla.org/firefox/addon/keepassxc-browser/\">Firefox</a>",
|
.arg("<a href=\"https://addons.mozilla.org/firefox/addon/keepassxc-browser/\">Firefox</a>",
|
||||||
"<a href=\"https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk\">"
|
"<a href=\"https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk\">"
|
||||||
"Google Chrome / Chromium / Vivaldi / Brave</a>",
|
"Google Chrome / Chromium / Vivaldi / Brave</a>",
|
||||||
|
"<a href=\"https://microsoftedge.microsoft.com/addons/detail/pdffhmdngciaglkoonimfcmckehcpafo\">Microsoft Edge</a>",
|
||||||
snapInstructions));
|
snapInstructions));
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -123,6 +124,7 @@ void BrowserOptionDialog::loadSettings()
|
||||||
m_ui->chromeSupport->setChecked(settings->chromeSupport());
|
m_ui->chromeSupport->setChecked(settings->chromeSupport());
|
||||||
m_ui->chromiumSupport->setChecked(settings->chromiumSupport());
|
m_ui->chromiumSupport->setChecked(settings->chromiumSupport());
|
||||||
m_ui->firefoxSupport->setChecked(settings->firefoxSupport());
|
m_ui->firefoxSupport->setChecked(settings->firefoxSupport());
|
||||||
|
m_ui->edgeSupport->setChecked(settings->edgeSupport());
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
m_ui->braveSupport->setChecked(settings->braveSupport());
|
m_ui->braveSupport->setChecked(settings->braveSupport());
|
||||||
m_ui->vivaldiSupport->setChecked(settings->vivaldiSupport());
|
m_ui->vivaldiSupport->setChecked(settings->vivaldiSupport());
|
||||||
|
@ -132,6 +134,12 @@ void BrowserOptionDialog::loadSettings()
|
||||||
m_ui->snapWarningLabel->setVisible(false);
|
m_ui->snapWarningLabel->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO: Enable when Linux version is released
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
m_ui->edgeSupport->setChecked(false);
|
||||||
|
m_ui->edgeSupport->setEnabled(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(KEEPASSXC_DIST_APPIMAGE)
|
#if defined(KEEPASSXC_DIST_APPIMAGE)
|
||||||
m_ui->supportBrowserProxy->setChecked(true);
|
m_ui->supportBrowserProxy->setChecked(true);
|
||||||
m_ui->supportBrowserProxy->setEnabled(false);
|
m_ui->supportBrowserProxy->setEnabled(false);
|
||||||
|
@ -194,6 +202,7 @@ void BrowserOptionDialog::saveSettings()
|
||||||
settings->setChromeSupport(m_ui->chromeSupport->isChecked());
|
settings->setChromeSupport(m_ui->chromeSupport->isChecked());
|
||||||
settings->setChromiumSupport(m_ui->chromiumSupport->isChecked());
|
settings->setChromiumSupport(m_ui->chromiumSupport->isChecked());
|
||||||
settings->setFirefoxSupport(m_ui->firefoxSupport->isChecked());
|
settings->setFirefoxSupport(m_ui->firefoxSupport->isChecked());
|
||||||
|
settings->setEdgeSupport(m_ui->edgeSupport->isChecked());
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
settings->setBraveSupport(m_ui->braveSupport->isChecked());
|
settings->setBraveSupport(m_ui->braveSupport->isChecked());
|
||||||
settings->setVivaldiSupport(m_ui->vivaldiSupport->isChecked());
|
settings->setVivaldiSupport(m_ui->vivaldiSupport->isChecked());
|
||||||
|
|
|
@ -167,6 +167,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QCheckBox" name="edgeSupport">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Edge</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -280,6 +280,17 @@ void BrowserSettings::setTorBrowserSupport(bool enabled)
|
||||||
HostInstaller::SupportedBrowsers::TOR_BROWSER, enabled, supportBrowserProxy(), customProxyLocation());
|
HostInstaller::SupportedBrowsers::TOR_BROWSER, enabled, supportBrowserProxy(), customProxyLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BrowserSettings::edgeSupport()
|
||||||
|
{
|
||||||
|
return m_hostInstaller.checkIfInstalled(HostInstaller::SupportedBrowsers::EDGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BrowserSettings::setEdgeSupport(bool enabled)
|
||||||
|
{
|
||||||
|
m_hostInstaller.installBrowser(
|
||||||
|
HostInstaller::SupportedBrowsers::EDGE, enabled, supportBrowserProxy(), customProxyLocation());
|
||||||
|
}
|
||||||
|
|
||||||
bool BrowserSettings::passwordUseNumbers()
|
bool BrowserSettings::passwordUseNumbers()
|
||||||
{
|
{
|
||||||
return config()->get("generator/Numbers", PasswordGenerator::DefaultNumbers).toBool();
|
return config()->get("generator/Numbers", PasswordGenerator::DefaultNumbers).toBool();
|
||||||
|
|
|
@ -80,6 +80,8 @@ public:
|
||||||
void setBraveSupport(bool enabled);
|
void setBraveSupport(bool enabled);
|
||||||
bool torBrowserSupport();
|
bool torBrowserSupport();
|
||||||
void setTorBrowserSupport(bool enabled);
|
void setTorBrowserSupport(bool enabled);
|
||||||
|
bool edgeSupport();
|
||||||
|
void setEdgeSupport(bool enabled);
|
||||||
|
|
||||||
bool passwordUseNumbers();
|
bool passwordUseNumbers();
|
||||||
void setPasswordUseNumbers(bool useNumbers);
|
void setPasswordUseNumbers(bool useNumbers);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
HostInstaller::HostInstaller()
|
HostInstaller::HostInstaller()
|
||||||
: HOST_NAME("org.keepassxc.keepassxc_browser")
|
: HOST_NAME("org.keepassxc.keepassxc_browser")
|
||||||
, ALLOWED_EXTENSIONS(QStringList() << "keepassxc-browser@keepassxc.org")
|
, ALLOWED_EXTENSIONS(QStringList() << "keepassxc-browser@keepassxc.org")
|
||||||
, ALLOWED_ORIGINS(QStringList() << "chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/"
|
, ALLOWED_ORIGINS(QStringList() << "chrome-extension://pdffhmdngciaglkoonimfcmckehcpafo/"
|
||||||
<< "chrome-extension://oboonakemofpalcgghocfoadofidjkkk/")
|
<< "chrome-extension://oboonakemofpalcgghocfoadofidjkkk/")
|
||||||
#if defined(Q_OS_MACOS)
|
#if defined(Q_OS_MACOS)
|
||||||
, TARGET_DIR_CHROME("/Library/Application Support/Google/Chrome/NativeMessagingHosts")
|
, TARGET_DIR_CHROME("/Library/Application Support/Google/Chrome/NativeMessagingHosts")
|
||||||
|
@ -40,6 +40,7 @@ HostInstaller::HostInstaller()
|
||||||
, TARGET_DIR_VIVALDI("/Library/Application Support/Vivaldi/NativeMessagingHosts")
|
, TARGET_DIR_VIVALDI("/Library/Application Support/Vivaldi/NativeMessagingHosts")
|
||||||
, TARGET_DIR_TOR_BROWSER("/Library/Application Support/TorBrowser-Data/Browser/Mozilla/NativeMessagingHosts")
|
, TARGET_DIR_TOR_BROWSER("/Library/Application Support/TorBrowser-Data/Browser/Mozilla/NativeMessagingHosts")
|
||||||
, TARGET_DIR_BRAVE("/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts")
|
, TARGET_DIR_BRAVE("/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts")
|
||||||
|
, TARGET_DIR_EDGE("/Library/Application Support/Microsoft Edge/NativeMessagingHosts")
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
// clang-format off
|
// clang-format off
|
||||||
, TARGET_DIR_CHROME("HKEY_CURRENT_USER\\Software\\Google\\Chrome\\NativeMessagingHosts\\org.keepassxc.keepassxc_browser")
|
, TARGET_DIR_CHROME("HKEY_CURRENT_USER\\Software\\Google\\Chrome\\NativeMessagingHosts\\org.keepassxc.keepassxc_browser")
|
||||||
|
@ -49,6 +50,8 @@ HostInstaller::HostInstaller()
|
||||||
, TARGET_DIR_VIVALDI(TARGET_DIR_CHROME)
|
, TARGET_DIR_VIVALDI(TARGET_DIR_CHROME)
|
||||||
, TARGET_DIR_TOR_BROWSER(TARGET_DIR_FIREFOX)
|
, TARGET_DIR_TOR_BROWSER(TARGET_DIR_FIREFOX)
|
||||||
, TARGET_DIR_BRAVE(TARGET_DIR_CHROME)
|
, TARGET_DIR_BRAVE(TARGET_DIR_CHROME)
|
||||||
|
, TARGET_DIR_EDGE(
|
||||||
|
"HKEY_CURRENT_USER\\Software\\Microsoft\\Edge\\NativeMessagingHosts\\org.keepassxc.keepassxc_browser")
|
||||||
#else
|
#else
|
||||||
, TARGET_DIR_CHROME("/.config/google-chrome/NativeMessagingHosts")
|
, TARGET_DIR_CHROME("/.config/google-chrome/NativeMessagingHosts")
|
||||||
, TARGET_DIR_CHROMIUM("/.config/chromium/NativeMessagingHosts")
|
, TARGET_DIR_CHROMIUM("/.config/chromium/NativeMessagingHosts")
|
||||||
|
@ -56,6 +59,7 @@ HostInstaller::HostInstaller()
|
||||||
, TARGET_DIR_VIVALDI("/.config/vivaldi/NativeMessagingHosts")
|
, TARGET_DIR_VIVALDI("/.config/vivaldi/NativeMessagingHosts")
|
||||||
, TARGET_DIR_TOR_BROWSER("/.tor-browser/app/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts")
|
, TARGET_DIR_TOR_BROWSER("/.tor-browser/app/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts")
|
||||||
, TARGET_DIR_BRAVE("/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts")
|
, TARGET_DIR_BRAVE("/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts")
|
||||||
|
, TARGET_DIR_EDGE("/.config/microsoftedge/NativeMessagingHosts")
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -139,8 +143,7 @@ void HostInstaller::installBrowser(SupportedBrowsers browser,
|
||||||
*/
|
*/
|
||||||
void HostInstaller::updateBinaryPaths(const bool& proxy, const QString& location)
|
void HostInstaller::updateBinaryPaths(const bool& proxy, const QString& location)
|
||||||
{
|
{
|
||||||
// Where 6 is the number of entries in the SupportedBrowsers enum declared in HostInstaller.h
|
for (int i = 0; i <= SupportedBrowsers::EDGE; ++i) {
|
||||||
for (int i = 0; i < 6; ++i) {
|
|
||||||
if (checkIfInstalled(static_cast<SupportedBrowsers>(i))) {
|
if (checkIfInstalled(static_cast<SupportedBrowsers>(i))) {
|
||||||
installBrowser(static_cast<SupportedBrowsers>(i), true, proxy, location);
|
installBrowser(static_cast<SupportedBrowsers>(i), true, proxy, location);
|
||||||
}
|
}
|
||||||
|
@ -168,6 +171,8 @@ QString HostInstaller::getTargetPath(SupportedBrowsers browser) const
|
||||||
return TARGET_DIR_TOR_BROWSER;
|
return TARGET_DIR_TOR_BROWSER;
|
||||||
case SupportedBrowsers::BRAVE:
|
case SupportedBrowsers::BRAVE:
|
||||||
return TARGET_DIR_BRAVE;
|
return TARGET_DIR_BRAVE;
|
||||||
|
case SupportedBrowsers::EDGE:
|
||||||
|
return TARGET_DIR_EDGE;
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
@ -195,6 +200,8 @@ QString HostInstaller::getBrowserName(SupportedBrowsers browser) const
|
||||||
return "tor-browser";
|
return "tor-browser";
|
||||||
case SupportedBrowsers::BRAVE:
|
case SupportedBrowsers::BRAVE:
|
||||||
return "brave";
|
return "brave";
|
||||||
|
case SupportedBrowsers::EDGE:
|
||||||
|
return "edge";
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ public:
|
||||||
FIREFOX = 2,
|
FIREFOX = 2,
|
||||||
VIVALDI = 3,
|
VIVALDI = 3,
|
||||||
TOR_BROWSER = 4,
|
TOR_BROWSER = 4,
|
||||||
BRAVE = 5
|
BRAVE = 5,
|
||||||
|
EDGE = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -68,6 +69,7 @@ private:
|
||||||
const QString TARGET_DIR_VIVALDI;
|
const QString TARGET_DIR_VIVALDI;
|
||||||
const QString TARGET_DIR_TOR_BROWSER;
|
const QString TARGET_DIR_TOR_BROWSER;
|
||||||
const QString TARGET_DIR_BRAVE;
|
const QString TARGET_DIR_BRAVE;
|
||||||
|
const QString TARGET_DIR_EDGE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HOSTINSTALLER_H
|
#endif // HOSTINSTALLER_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue