mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1286 from keepassxreboot/fix/version_error_message
Fix version error message on options page
This commit is contained in:
commit
cd01082051
2 changed files with 12 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue