From a1c36147649f7a389c27fc4a51d289bf7db22f65 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Thu, 4 Nov 2021 18:44:38 +0100 Subject: [PATCH] Simplify text displayed in notificationBar and remove css which modified it --- src/_locales/en/messages.json | 7 ++----- src/notification/bar.html | 6 +++--- src/notification/bar.js | 11 +++-------- src/notification/bar.scss | 26 -------------------------- 4 files changed, 8 insertions(+), 42 deletions(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index af284dde2b..7d129dd59f 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -558,10 +558,7 @@ "message": "Should Bitwarden remember this password for you?" }, "notificationAddSave": { - "message": "Yes, Save Now" - }, - "notificationNeverSave": { - "message": "Never for this website" + "message": "Save" }, "disableChangedPasswordNotification": { "message": "Disable Changed Password Notification" @@ -573,7 +570,7 @@ "message": "Do you want to update this password in Bitwarden?" }, "notificationChangeSave": { - "message": "Yes, Update Now" + "message": "Update" }, "disableContextMenuItem": { "message": "Disable Context Menu Options" diff --git a/src/notification/bar.html b/src/notification/bar.html index 1772389c7c..a03c566f19 100644 --- a/src/notification/bar.html +++ b/src/notification/bar.html @@ -24,15 +24,15 @@
- + - +
- +
diff --git a/src/notification/bar.js b/src/notification/bar.js index 338d3546fe..665f882117 100644 --- a/src/notification/bar.js +++ b/src/notification/bar.js @@ -6,11 +6,9 @@ document.addEventListener('DOMContentLoaded', () => { i18n.appName = chrome.i18n.getMessage('appName'); i18n.close = chrome.i18n.getMessage('close'); - i18n.yes = chrome.i18n.getMessage('yes'); i18n.never = chrome.i18n.getMessage('never'); i18n.folder = chrome.i18n.getMessage('folder'); i18n.notificationAddSave = chrome.i18n.getMessage('notificationAddSave'); - i18n.notificationNeverSave = chrome.i18n.getMessage('notificationNeverSave'); i18n.notificationAddDesc = chrome.i18n.getMessage('notificationAddDesc'); i18n.notificationChangeSave = chrome.i18n.getMessage('notificationChangeSave'); i18n.notificationChangeDesc = chrome.i18n.getMessage('notificationChangeDesc'); @@ -28,20 +26,17 @@ document.addEventListener('DOMContentLoaded', () => { document.getElementById('logo-link').title = i18n.appName; var neverButton = document.querySelector('#template-add .never-save'); - neverButton.setAttribute('short-text', i18n.never); - neverButton.setAttribute('full-text', i18n.notificationNeverSave); + neverButton.textContent = i18n.never; var selectFolder = document.querySelector('#template-add .select-folder'); selectFolder.setAttribute('aria-label', i18n.folder); selectFolder.setAttribute('isVaultLocked', isVaultLocked.toString()); var addButton = document.querySelector('#template-add .add-save'); - addButton.setAttribute('short-text', i18n.yes); - addButton.setAttribute('full-text', i18n.notificationAddSave); + addButton.textContent = i18n.notificationAddSave; var changeButton = document.querySelector('#template-change .change-save'); - changeButton.setAttribute('short-text', i18n.yes); - changeButton.setAttribute('full-text', i18n.notificationChangeSave); + changeButton.textContent = i18n.notificationChangeSave; var closeIcon = document.getElementById('close'); closeIcon.src = chrome.runtime.getURL('images/close.png'); diff --git a/src/notification/bar.scss b/src/notification/bar.scss index a5ba203da0..51b818ea51 100644 --- a/src/notification/bar.scss +++ b/src/notification/bar.scss @@ -80,33 +80,7 @@ button.neutral { 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) { - .never-save::after { - content: attr(short-text); - } - - .add-save::after { - content: attr(short-text); - } - - .change-save::after { - content: attr(short-text); - } - .select-folder { display: none }