Rename Credential Banner buttons

This commit is contained in:
varjolintu 2024-06-09 13:08:30 +03:00
parent 72832c1a5b
commit 71ff89526e
2 changed files with 10 additions and 4 deletions

View file

@ -558,9 +558,13 @@
"message": "Update",
"description": "Update button text in popup when updating credentials."
},
"popupButtonDismiss": {
"message": "Dismiss",
"description": "Dismiss button text in popup when updating credentials."
"popupButtonCancel": {
"message": "Cancel",
"description": "Cancel button text in popup when updating credentials."
},
"popupButtonBack": {
"message": "Back",
"description": "Back button text in popup when updating credentials."
},
"popupButtonIgnore": {
"message": "Don't ask again for this site",

View file

@ -72,7 +72,7 @@ kpxcBanner.create = async function(credentials = {}) {
'button',
RED_BUTTON,
{ id: 'kpxc-banner-btn-dismiss' },
tr('popupButtonDismiss'),
tr('popupButtonCancel'),
);
const separator = kpxcUI.createElement('div', 'kpxc-separator');
@ -106,6 +106,7 @@ kpxcBanner.create = async function(credentials = {}) {
return;
}
kpxcBanner.updateCredentials(credentials);
dismissButton.textContent = tr('popupButtonBack');
});
dismissButton.addEventListener('click', function(e) {
@ -120,6 +121,7 @@ kpxcBanner.create = async function(credentials = {}) {
kpxcBanner.shadowSelector('#kpxc-banner-btn-update').hidden = false;
kpxcBanner.shadowSelector('.kpxc-checkbox').disabled = false;
kpxcBanner.banner.removeChild(dialog);
dismissButton.textContent = tr('popupButtonCancel');
} else {
if (ignoreCheckbox.checked) {
const ignoreUrl = window.location.href.slice(0, window.location.href.lastIndexOf('/') + 1) + '*';