Merge pull request #232 from keepassxreboot/infinite_credential_wait

Allow infinite waiting on remember credentials
This commit is contained in:
Janek Bevendorff 2018-07-29 13:01:16 +02:00 committed by GitHub
commit ecda726834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ browserAction.update = function(interval) {
let data = page.tabs[page.currentTabId].stack[page.tabs[page.currentTabId].stack.length - 1];
if (data.visibleForMilliSeconds !== undefined) {
if (data.visibleForMilliSeconds !== undefined && data.visibleForMilliSeconds !== -1) {
if (data.visibleForMilliSeconds <= 0) {
browserAction.stackPop(page.currentTabId);
browserAction.show(null, {'id': page.currentTabId});
@ -215,13 +215,13 @@ browserAction.setRememberPopup = function(tabId, username, password, url, userna
}
const id = tabId || page.currentTabId;
let timeoutMinMillis = Number(getValueOrDefault(settings, 'blinkMinTimeout', BLINK_TIMEOUT_REDIRECT_THRESHOLD_TIME_DEFAULT, 0));
let timeoutMinMillis = Number(getValueOrDefault(settings, 'blinkMinTimeout', BLINK_TIMEOUT_REDIRECT_THRESHOLD_TIME_DEFAULT, -1));
if (timeoutMinMillis > 0) {
timeoutMinMillis += Date.now();
}
const blinkTimeout = getValueOrDefault(settings, 'blinkTimeout', BLINK_TIMEOUT_DEFAULT, 0);
const blinkTimeout = getValueOrDefault(settings, 'blinkTimeout', BLINK_TIMEOUT_DEFAULT, -1);
const pageUpdateAllowance = getValueOrDefault(settings, 'allowedRedirect', BLINK_TIMEOUT_REDIRECT_COUNT_DEFAULT, 0);
const stackData = {

View file

@ -40,14 +40,14 @@
<label for="blinkTimeout">Blink Time:</label>
<div class="control-group">
<div class="input-append">
<input type="number" id="blinkTimeout" placeholder="7500" value="7500" min="0"/>
<input type="number" id="blinkTimeout" placeholder="7500" value="7500" min="-1"/>
<button class="btn btn-sm btn-primary" id="blinkTimeoutButton" type="button"><span class="glyphicon glyphicon-floppy-disk"></span> Save</button>
</div>
</div>
<span class="help-inline">
What is the maximum time (ms) the icon should blink after detecting new credentials
<br />
Default: 7500
Default: 7500, Infinite: -1
</span>
</div>
</p>