Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc-browser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Vänttinen <sami.vanttinen@protonmail.com>2021-03-29 07:00:23 +0300
committerGitHub <noreply@github.com>2021-03-29 07:00:23 +0300
commitcd0108205159d6a65fb4fafddc7bfd3c4918ed1e (patch)
treef04384fbdb4b4815c072c86df826613503216472
parent71497adef311f211f53c3835db73f6c293d2df55 (diff)
parentb1faeddbd851db85a377176826fc1f9a18e4ebdf (diff)
Merge pull request #1286 from keepassxreboot/fix/version_error_message1.7.7
Fix version error message on options page
-rwxr-xr-xkeepassxc-browser/background/event.js5
-rw-r--r--keepassxc-browser/options/options.js9
2 files changed, 12 insertions, 2 deletions
diff --git a/keepassxc-browser/background/event.js b/keepassxc-browser/background/event.js
index 986935a..f3b5ab7 100755
--- a/keepassxc-browser/background/event.js
+++ b/keepassxc-browser/background/event.js
@@ -194,12 +194,17 @@ kpxcEvent.pageClearLogins = async function(tab, alreadyCalled) {
}
};
+kpxcEvent.compareVersion = async function(tab, args = []) {
+ return keepass.compareVersion(args[0], args[1]);
+};
+
// All methods named in this object have to be declared BEFORE this!
kpxcEvent.messageHandlers = {
'add_credentials': keepass.addCredentials,
'associate': keepass.associate,
'check_database_hash': keepass.checkDatabaseHash,
'check_update_keepassxc': kpxcEvent.onCheckUpdateKeePassXC,
+ 'compare_version': kpxcEvent.compareVersion,
'create_new_group': keepass.createNewGroup,
'enable_automatic_reconnect': keepass.enableAutomaticReconnect,
'disable_automatic_reconnect': keepass.disableAutomaticReconnect,
diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js
index 33c4cc6..291e69b 100644
--- a/keepassxc-browser/options/options.js
+++ b/keepassxc-browser/options/options.js
@@ -273,7 +273,7 @@ options.initGeneralSettings = function() {
}
};
-options.showKeePassXCVersions = function(response) {
+options.showKeePassXCVersions = async function(response) {
if (response.current === '') {
response.current = 'unknown';
}
@@ -286,7 +286,12 @@ options.showKeePassXCVersions = function(response) {
$('#tab-about span.kpxcVersion').text(response.current);
$('#tab-general-settings button.checkUpdateKeePassXC:first').attr('disabled', false);
- if (response.current.startsWith('2.6') || response.current === '2.5.3-snapshot') {
+ const result = await browser.runtime.sendMessage({
+ action: 'compare_version',
+ args: [ '2.6.0', response.current ]
+ });
+
+ if (result) {
$('#tab-general-settings #versionRequiredAlert').hide();
} else {
$('#tab-general-settings #showGroupNameInAutocomplete').attr('disabled', true);