More minor fixes

This commit is contained in:
varjolintu 2017-10-31 19:05:36 +02:00
parent 192e647465
commit 08b8b0e252
4 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,8 @@
0.3.8 (??-??-2017)
=========================
- Use browser.local.storage instead of localStorage
- Switched some functions to promise
0.3.7 (22-10-2017)
=========================
- Improved credentials check (does not use protocol requests for polling)

View file

@ -181,9 +181,9 @@ kpxcEvent.onGetConnectedDatabase = function(callback, tab) {
kpxcEvent.onGetKeePassXCVersions = function(callback, tab) {
if(keepass.currentKeePassXC.version == 0) {
keepass.getDatabaseHash(tab).then(() => {
keepass.getDatabaseHash((res) => {
callback({"current": keepass.currentKeePassXC.version, "latest": keepass.currentKeePassXC.version});
});
}, tab);
} else {
callback({"current": keepass.currentKeePassXC.version, "latest": keepass.currentKeePassXC.version});
}

View file

@ -18,7 +18,6 @@ keepass.keySize = 24;
keepass.latestVersionUrl = 'https://api.github.com/repos/keepassxreboot/keepassxc/releases/latest';
keepass.cacheTimeout = 30 * 1000; // milliseconds
keepass.databaseHash = 'no-hash'; //no-hash = KeePassXC is too old and does not return a hash value
keepass.keyRing = (typeof(localStorage.keyRing) === 'undefined') ? {} : JSON.parse(localStorage.keyRing);
keepass.keyId = 'keepassxc-browser-cryptokey-name';
keepass.keyBody = 'keepassxc-browser-key';
keepass.messageTimeout = 500; // milliseconds
@ -633,8 +632,8 @@ keepass.generateNewKeyPair = function() {
keepass.isConfigured = function() {
return new Promise((resolve, reject) => {
if (typeof(keepass.databaseHash) === 'undefined') {
keepass.getDatabaseHash().then((hash) => {
if (typeof(keepass.databaseHash) === 'undefined' || keepass.databaseHash === 'no-hash') {
keepass.getDatabaseHash((hash) => {
resolve(hash in keepass.keyRing);
});
} else {

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "keepassxc-browser",
"version": "0.3.7",
"version": "0.3.8",
"description": "KeePassXC integration for modern web browsers",
"author": "Sami Vänttinen",
"icons": {