mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Version 0.2.4
This commit is contained in:
parent
f76b6c6702
commit
2d0c47b485
10 changed files with 53 additions and 249 deletions
|
|
@ -1,3 +1,11 @@
|
|||
0.2.4 (2017-07-11)
|
||||
=========================
|
||||
- Changed comparison operators to strict ones (and some code cleaning)
|
||||
- Copy and Fill & copy buttons are now hidden when Password Generator has an error
|
||||
- Fix to a bug when reconnecting to KeePassXC (sometimes public keys are changed too quickly)
|
||||
- Fix for password generator (error is now shown immediately instead of a blank dialog)
|
||||
- Use a single password generator icon
|
||||
|
||||
0.2.3 (2017-07-05)
|
||||
=========================
|
||||
- Fixed a few variables
|
||||
|
|
|
|||
|
|
@ -141,33 +141,37 @@ event.onGetStatus = function(callback, tab) {
|
|||
|
||||
event.onReconnect = function(callback, tab) {
|
||||
keepass.connectToNative();
|
||||
keepass.generateNewKeyPair();
|
||||
keepass.changePublicKeys(null, (pkRes) => {
|
||||
keepass.getDatabaseHash((gdRes) => {
|
||||
if (gdRes) {
|
||||
keepass.testAssociation((response) => {
|
||||
keepass.isConfigured((configured) => {
|
||||
let 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);
|
||||
});
|
||||
// Add a small timeout after reconnecting. Just to make sure. It's not pretty, I know :(
|
||||
setTimeout(() => {
|
||||
keepass.generateNewKeyPair();
|
||||
keepass.changePublicKeys(tab, (pkRes) => {
|
||||
keepass.getDatabaseHash((gdRes) => {
|
||||
if (gdRes) {
|
||||
keepass.testAssociation((response) => {
|
||||
keepass.isConfigured((configured) => {
|
||||
let 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);
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
event.onPopStack = function(callback, tab) {
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ keepass.callbackOnId = function (ev, id, callback) {
|
|||
|
||||
keepass.generatePassword = function (callback, tab, forceCallback) {
|
||||
if (!keepass.isConnected) {
|
||||
callback([]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -429,7 +430,7 @@ keepass.getDatabaseHash = function (callback, tab, triggerUnlock) {
|
|||
}
|
||||
|
||||
if (!keepass.serverPublicKey) {
|
||||
keepass.changePublicKeys(tab, (res) => {});
|
||||
keepass.changePublicKeys(tab, null);
|
||||
}
|
||||
|
||||
const kpAction = kpActions.GET_DATABASE_HASH;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ window.browser = (function () {
|
|||
})();
|
||||
|
||||
var page = {};
|
||||
|
||||
// special information for every tab
|
||||
page.tabs = {};
|
||||
|
||||
page.currentTabId = -1;
|
||||
|
|
@ -114,7 +112,7 @@ page.debugConsole = function() {
|
|||
};
|
||||
|
||||
page.sprintf = function(input, args) {
|
||||
return input.replace(/{(\d+)}/g, function(match, number) {
|
||||
return input.replace(/{(\d+)}/g, (match, number) => {
|
||||
return typeof args[number] !== 'undefined'
|
||||
? (typeof args[number] === 'object' ? JSON.stringify(args[number]) : args[number])
|
||||
: match
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
|
@ -1,149 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="121mm"
|
||||
height="121mm"
|
||||
viewBox="0 0 428.74019 428.74016"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="keytest.svg">
|
||||
<title
|
||||
id="title5946">Key</title>
|
||||
<defs
|
||||
id="defs4">
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path4147"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mstart"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path4150"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="83.933899"
|
||||
inkscape:cy="343.33203"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer2"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1002"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Key</dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Sami Vänttinen</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by/3.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-185.31739,-221.41039)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Layer 2"
|
||||
style="display:inline"
|
||||
transform="translate(-185.31739,-221.41039)">
|
||||
<g
|
||||
id="g5949"
|
||||
transform="translate(22.957793,0)">
|
||||
<rect
|
||||
transform="matrix(-0.70710678,0.70710678,-0.70710678,-0.70710678,-2.0915547e-6,-1.6529645e-6)"
|
||||
ry="0"
|
||||
y="-590.58051"
|
||||
x="-64.926453"
|
||||
height="62.857143"
|
||||
width="328.57144"
|
||||
id="rect3338"
|
||||
style="fill:#ffdd55;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3336"
|
||||
d="m 474.28655,223.79018 a 92.85714,92.85714 0 0 0 -92.85743,92.85742 92.85714,92.85714 0 0 0 92.85743,92.85742 92.85714,92.85714 0 0 0 92.85546,-92.85742 92.85714,92.85714 0 0 0 -92.85546,-92.85742 z m 0,49.52148 a 42.577816,43.33543 0 0 1 42.57617,43.33594 42.577816,43.33543 0 0 1 -42.57617,43.33594 42.577816,43.33543 0 0 1 -42.57813,-43.33594 42.577816,43.33543 0 0 1 42.57813,-43.33594 z"
|
||||
style="fill:#ffdd55;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect5936"
|
||||
d="m 317.49023,517.41602 -71.7207,71.7207 59.59766,59.59961 15.34765,-15.34766 0,-45.3125 45.3125,0 11.06055,-11.06055 -59.59766,-59.5996 z"
|
||||
style="fill:#ffdd55;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Layer 3"
|
||||
style="display:inline"
|
||||
transform="translate(-185.31739,-221.41039)" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 481 B |
|
|
@ -69,49 +69,13 @@ input.genpw-text {
|
|||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cip-genpw-icon.small {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(chrome-extension://__MSG_@@extension_id__/icons/key_16x16.png);
|
||||
.cip-genpw-icon.key {
|
||||
background: url('chrome-extension://__MSG_@@extension_id__/icons/key.png') right no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
.cip-genpw-icon.big {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-image: url(chrome-extension://__MSG_@@extension_id__/icons/key_24x24.png);
|
||||
}
|
||||
.cip-genpw-icon.small-moz {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(moz-extension://__MSG_@@extension_id__/icons/key_16x16.png);
|
||||
}
|
||||
.cip-genpw-icon.big-moz {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-image: url(moz-extension://__MSG_@@extension_id__/icons/key_24x24.png);
|
||||
}
|
||||
.cip-warning-icon {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cip-warning-icon.small {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(chrome-extension://__MSG_@@extension_id__/icons/warning_16x16.png);
|
||||
}
|
||||
.cip-warning-icon.big {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-image: url(chrome-extension://__MSG_@@extension_id__/icons/warning_24x24.png);
|
||||
}
|
||||
.cip-warning-icon.small-moz {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(moz-extension://__MSG_@@extension_id__/icons/warning_16x16.png);
|
||||
}
|
||||
.cip-warning-icon.big-moz {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-image: url(moz-extension://__MSG_@@extension_id__/icons/warning_24x24.png);
|
||||
.cip-genpw-icon.key-moz {
|
||||
background: url('moz-extension://__MSG_@@extension_id__/icons/key.png') right no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
#cip-genpw-btn-fillin {
|
||||
|
|
|
|||
|
|
@ -335,36 +335,17 @@ cipPassword.createDialog = function() {
|
|||
}
|
||||
|
||||
cipPassword.createIcon = function(field) {
|
||||
const $className = (field.outerHeight() > 28) ? (isFirefox ? 'big-moz' : 'big') : (isFirefox ? 'small-moz' : 'small');
|
||||
const $className = (isFirefox ? 'key-moz' : 'key');
|
||||
const $size = (field.outerHeight() > 28) ? 24 : 16;
|
||||
let $offset = Math.floor((field.outerHeight() - $size) / 3);
|
||||
$offset = ($offset < 0) ? 0 : $offset;
|
||||
|
||||
let $zIndex = 0;
|
||||
let $zIndexField = field;
|
||||
let z;
|
||||
let c = 0;
|
||||
while ($zIndexField.length > 0) {
|
||||
if (c > 100 || $zIndexField[0].nodeName === '#document') {
|
||||
break;
|
||||
}
|
||||
z = $zIndexField.css('z-index');
|
||||
if (!isNaN(z) && Number(z) > $zIndex) {
|
||||
$zIndex = Number(z);
|
||||
}
|
||||
$zIndexField = $zIndexField.parent();
|
||||
c++;
|
||||
}
|
||||
|
||||
if (isNaN($zIndex) || $zIndex < 1) {
|
||||
$zIndex = 1;
|
||||
}
|
||||
$zIndex += 1;
|
||||
|
||||
const $icon = jQuery('<div>').addClass('cip-genpw-icon')
|
||||
.addClass($className)
|
||||
.attr('title', 'Generate password')
|
||||
.css('z-index', $zIndex)
|
||||
.css('z-index', '9999')
|
||||
.css('width', $size)
|
||||
.css('height', $size)
|
||||
.data('size', $size)
|
||||
.data('offset', $offset)
|
||||
.data('cip-genpw-field-id', field.data('cip-id'));
|
||||
|
|
@ -396,7 +377,6 @@ cipPassword.createIcon = function(field) {
|
|||
});
|
||||
|
||||
cipPassword.observedIcons.push($icon);
|
||||
|
||||
jQuery('body').append($icon);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "keepassxc-browser",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"description": "KeePassXC integration for modern web browsers",
|
||||
"author": "Sami Vänttinen",
|
||||
"icons": {
|
||||
|
|
@ -60,9 +60,7 @@
|
|||
}
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
"icons/key_16x16.png",
|
||||
"icons/key_24x24.png",
|
||||
"icons/key.svg"
|
||||
"icons/key.png"
|
||||
],
|
||||
"permissions": [
|
||||
"contextMenus",
|
||||
|
|
|
|||
Loading…
Reference in a new issue