settings: pasting private key should update pubkey
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details

If the user pastes a private-key and the pubkey input is empty,
it should be ok to generate and autofill the pubkey field without
confusing the user. There might be circumstances where it is
preferred to see an error if the pubkey does not correspond with
the private key.
OFF0 2 years ago
parent cfb7a2dc35
commit 123b3655e2
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -605,6 +605,12 @@ privateTgl.addEventListener('click', () => {
privateKeyInput.value = localStorage.getItem('private_key');
pubKeyInput.value = localStorage.getItem('pub_key');
privateKeyInput.addEventListener('paste', (event) => {
if (!pubKeyInput.value && event.clipboardData) {
pubKeyInput.value = getPublicKey(event.clipboardData.getData('text'));
}
});
document.body.addEventListener('click', (e) => {
const container = e.target.closest('[data-append]');
if (container) {

Loading…
Cancel
Save