mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Hide the connected key(s) partially in the settings tab
This commit is contained in:
parent
e7ade37830
commit
4ad583e10f
1 changed files with 5 additions and 1 deletions
|
|
@ -156,6 +156,10 @@ options.showKeePassXCVersions = function(response) {
|
|||
$('#tab-general-settings button.checkUpdateKeePassXC:first').attr('disabled', false);
|
||||
};
|
||||
|
||||
options.getPartiallyHiddenKey = function(key) {
|
||||
return !key ? 'Error' : (key.substr(0, 8) + '*'.repeat(10));
|
||||
};
|
||||
|
||||
options.initConnectedDatabases = function() {
|
||||
$('#dialogDeleteConnectedDatabase').modal({keyboard: true, show: false, backdrop: true});
|
||||
$('#tab-connected-databases tr.clone:first button.delete:first').click(function(e) {
|
||||
|
|
@ -193,7 +197,7 @@ options.initConnectedDatabases = function() {
|
|||
$('a.dropdown-toggle:first img:first', tr).attr('src', '/icons/19x19/icon_normal_19x19.png');
|
||||
|
||||
tr.children('td:first').text(options.keyRing[hash].id);
|
||||
tr.children('td:eq(1)').text(options.keyRing[hash].key);
|
||||
tr.children('td:eq(1)').text(options.getPartiallyHiddenKey(options.keyRing[hash].key));
|
||||
const lastUsed = (options.keyRing[hash].lastUsed) ? new Date(options.keyRing[hash].lastUsed).toLocaleString() : 'unknown';
|
||||
tr.children('td:eq(2)').text(lastUsed);
|
||||
const date = (options.keyRing[hash].created) ? new Date(options.keyRing[hash].created).toLocaleDateString() : 'unknown';
|
||||
|
|
|
|||
Loading…
Reference in a new issue