Simplify text displayed in notificationBar and remove css which modified it

This commit is contained in:
Daniel James Smith 2021-11-04 18:44:38 +01:00
parent d495ed6c1f
commit a1c3614764
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
4 changed files with 8 additions and 42 deletions

View File

@ -558,10 +558,7 @@
"message": "Should Bitwarden remember this password for you?" "message": "Should Bitwarden remember this password for you?"
}, },
"notificationAddSave": { "notificationAddSave": {
"message": "Yes, Save Now" "message": "Save"
},
"notificationNeverSave": {
"message": "Never for this website"
}, },
"disableChangedPasswordNotification": { "disableChangedPasswordNotification": {
"message": "Disable Changed Password Notification" "message": "Disable Changed Password Notification"
@ -573,7 +570,7 @@
"message": "Do you want to update this password in Bitwarden?" "message": "Do you want to update this password in Bitwarden?"
}, },
"notificationChangeSave": { "notificationChangeSave": {
"message": "Yes, Update Now" "message": "Update"
}, },
"disableContextMenuItem": { "disableContextMenuItem": {
"message": "Disable Context Menu Options" "message": "Disable Context Menu Options"

View File

@ -24,15 +24,15 @@
<div class="inner-wrapper" id="template-add"> <div class="inner-wrapper" id="template-add">
<div class="add-text"></div> <div class="add-text"></div>
<div class="add-buttons"> <div class="add-buttons">
<button type="button" class="never-save link " short-text="" full-text=""></button> <button type="button" class="never-save link"></button>
<select class="select-folder" isVaultLocked="false"></select> <select class="select-folder" isVaultLocked="false"></select>
<button type="button" class="add-save" short-text="" full-text=""></button> <button type="button" class="add-save"></button>
</div> </div>
</div> </div>
<div class="inner-wrapper" id="template-change"> <div class="inner-wrapper" id="template-change">
<div class="change-text"></div> <div class="change-text"></div>
<div class="change-buttons"> <div class="change-buttons">
<button type="button" class="change-save" short-text="" full-text=""></button> <button type="button" class="change-save"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -6,11 +6,9 @@ document.addEventListener('DOMContentLoaded', () => {
i18n.appName = chrome.i18n.getMessage('appName'); i18n.appName = chrome.i18n.getMessage('appName');
i18n.close = chrome.i18n.getMessage('close'); i18n.close = chrome.i18n.getMessage('close');
i18n.yes = chrome.i18n.getMessage('yes');
i18n.never = chrome.i18n.getMessage('never'); i18n.never = chrome.i18n.getMessage('never');
i18n.folder = chrome.i18n.getMessage('folder'); i18n.folder = chrome.i18n.getMessage('folder');
i18n.notificationAddSave = chrome.i18n.getMessage('notificationAddSave'); i18n.notificationAddSave = chrome.i18n.getMessage('notificationAddSave');
i18n.notificationNeverSave = chrome.i18n.getMessage('notificationNeverSave');
i18n.notificationAddDesc = chrome.i18n.getMessage('notificationAddDesc'); i18n.notificationAddDesc = chrome.i18n.getMessage('notificationAddDesc');
i18n.notificationChangeSave = chrome.i18n.getMessage('notificationChangeSave'); i18n.notificationChangeSave = chrome.i18n.getMessage('notificationChangeSave');
i18n.notificationChangeDesc = chrome.i18n.getMessage('notificationChangeDesc'); i18n.notificationChangeDesc = chrome.i18n.getMessage('notificationChangeDesc');
@ -28,20 +26,17 @@ document.addEventListener('DOMContentLoaded', () => {
document.getElementById('logo-link').title = i18n.appName; document.getElementById('logo-link').title = i18n.appName;
var neverButton = document.querySelector('#template-add .never-save'); var neverButton = document.querySelector('#template-add .never-save');
neverButton.setAttribute('short-text', i18n.never); neverButton.textContent = i18n.never;
neverButton.setAttribute('full-text', i18n.notificationNeverSave);
var selectFolder = document.querySelector('#template-add .select-folder'); var selectFolder = document.querySelector('#template-add .select-folder');
selectFolder.setAttribute('aria-label', i18n.folder); selectFolder.setAttribute('aria-label', i18n.folder);
selectFolder.setAttribute('isVaultLocked', isVaultLocked.toString()); selectFolder.setAttribute('isVaultLocked', isVaultLocked.toString());
var addButton = document.querySelector('#template-add .add-save'); var addButton = document.querySelector('#template-add .add-save');
addButton.setAttribute('short-text', i18n.yes); addButton.textContent = i18n.notificationAddSave;
addButton.setAttribute('full-text', i18n.notificationAddSave);
var changeButton = document.querySelector('#template-change .change-save'); var changeButton = document.querySelector('#template-change .change-save');
changeButton.setAttribute('short-text', i18n.yes); changeButton.textContent = i18n.notificationChangeSave;
changeButton.setAttribute('full-text', i18n.notificationChangeSave);
var closeIcon = document.getElementById('close'); var closeIcon = document.getElementById('close');
closeIcon.src = chrome.runtime.getURL('images/close.png'); closeIcon.src = chrome.runtime.getURL('images/close.png');

View File

@ -80,33 +80,7 @@ button.neutral {
display: none display: none
} }
@media screen and (min-width: 768px) {
.never-save::after {
content: attr(full-text);
}
.add-save::after {
content: attr(full-text);
}
.change-save::after {
content: attr(full-text);
}
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.never-save::after {
content: attr(short-text);
}
.add-save::after {
content: attr(short-text);
}
.change-save::after {
content: attr(short-text);
}
.select-folder { .select-folder {
display: none display: none
} }