mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Added a feature to relaunch KeePassXC if it has been exited.
This commit is contained in:
parent
3810640c07
commit
36063e5fe3
5 changed files with 40 additions and 7 deletions
|
|
@ -1,3 +1,7 @@
|
|||
0.1.8 (2017-05-28)
|
||||
=========================
|
||||
- Enable relaunching and reconnecting to KeePassXC
|
||||
|
||||
0.1.7 (2017-05-28)
|
||||
=========================
|
||||
- Removed debug logging messages
|
||||
|
|
|
|||
|
|
@ -141,6 +141,37 @@ event.onGetStatus = function(callback, tab) {
|
|||
}, tab);
|
||||
}
|
||||
|
||||
event.onReconnect = function(callback, tab) {
|
||||
keepass.connectToNative();
|
||||
keepass.generateNewKeyPair();
|
||||
keepass.changePublicKeys(null, function(pkRes) {
|
||||
keepass.getDatabaseHash(function(gdRes) {
|
||||
if (gdRes) {
|
||||
keepass.testAssociation(function(response) {
|
||||
keepass.isConfigured(function(configured) {
|
||||
var keyId = null;
|
||||
if (configured) {
|
||||
keyId = keepass.keyRing[keepass.databaseHash].id;
|
||||
}
|
||||
|
||||
browserAction.showDefault(null, tab);
|
||||
console.log(page.tabs[tab.id].errorMessage);
|
||||
callback({
|
||||
identifier: keyId,
|
||||
configured: configured,
|
||||
databaseClosed: keepass.isDatabaseClosed,
|
||||
keePassXCAvailable: keepass.isKeePassXCAvailable,
|
||||
encryptionKeyUnrecognized: keepass.isEncryptionKeyUnrecognized,
|
||||
associated: keepass.isAssociated(),
|
||||
error: page.tabs[tab.id].errorMessage
|
||||
});
|
||||
});
|
||||
}, tab);
|
||||
}
|
||||
}, null);
|
||||
});
|
||||
}
|
||||
|
||||
event.onPopStack = function(callback, tab) {
|
||||
browserAction.stackPop(tab.id);
|
||||
browserAction.show(null, tab);
|
||||
|
|
@ -250,5 +281,6 @@ event.messageHandlers = {
|
|||
'stack_add': browserAction.stackAdd,
|
||||
'update_available_keepassxc': event.onUpdateAvailableKeePassXC,
|
||||
'generate_password': keepass.generatePassword,
|
||||
'copy_password': keepass.copyPassword
|
||||
'copy_password': keepass.copyPassword,
|
||||
"reconnect": event.onReconnect
|
||||
};
|
||||
|
|
@ -490,7 +490,7 @@ keepass.getDatabaseHash = function (callback, tab, triggerUnlock) {
|
|||
}
|
||||
|
||||
keepass.changePublicKeys = function(tab, callback) {
|
||||
if (!keepass.isConnected || keepass.serverPublicKey) {
|
||||
if (!keepass.isConnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -529,9 +529,6 @@ keepass.changePublicKeys = function(tab, callback) {
|
|||
}
|
||||
|
||||
keepass.generateNewKeyPair = function() {
|
||||
if (keepass.keyPair.publicKey !== null && keepass.keyPair.secretKey !== null)
|
||||
return;
|
||||
|
||||
keepass.keyPair = nacl.box.keyPair();
|
||||
//console.log(keepass.b64e(keepass.keyPair.publicKey) + " " + keepass.b64e(keepass.keyPair.secretKey));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "chromeKeePassXC",
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"description": "KeePassXC integration for modern web browsers",
|
||||
"author": "Sami Vänttinen",
|
||||
"icons": {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ $(function() {
|
|||
|
||||
$("#reload-status-button").click(function() {
|
||||
browser.runtime.sendMessage({
|
||||
action: "get_status"
|
||||
action: "reconnect"
|
||||
}, status_response);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue