Bug 1926708 - Show success notifications at each step in account hub. r=vineet

Differential Revision: https://phabricator.services.mozilla.com/D227203

Depends on D228112

--HG--
extra : rebase_source : 6e0de5d33b8c06e2d931ccc5484544dd8933ec91
extra : amend_source : 6ed2c66dc1ec2483af480278e85010c4e20f0511
This commit is contained in:
Alexander Schmitz 2024-11-06 18:03:34 +00:00
Родитель ce8e7e9231
Коммит 53bc2e10b0
2 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@ -444,6 +444,7 @@ class AccountHubEmail extends HTMLElement {
* @param {Object} stateData - The current state data of the email flow.
*/
async #handleForwardAction(currentState, stateData) {
const notificationBox = this.#states[currentState].subview;
switch (currentState) {
case "autoConfigSubview":
try {
@ -482,12 +483,28 @@ class AccountHubEmail extends HTMLElement {
case "outgoingConfigSubview":
break;
case "emailConfigFoundSubview":
notificationBox.showNotification({
fluentTitleId: "account-hub-config-success",
type: "success",
});
break;
case "emailPasswordSubview":
notificationBox.showNotification({
fluentTitleId: "account-hub-password-info",
type: "info",
});
break;
case "emailSyncAccountsSubview":
notificationBox.showNotification({
fluentTitleId: "account-hub-sync-success",
type: "success",
});
break;
case "emailAddedSubview":
notificationBox.showNotification({
fluentTitleId: "account-hub-email-added-success",
type: "success",
});
break;
default:
break;

Просмотреть файл

@ -165,3 +165,11 @@ account-hub-result-ews-text = Server
account-hub-result-recommended-label = Recommended
account-hub-edit-configuration = Edit configuration
account-hub-config-success = Configuration found in Mozilla ISPDB
account-hub-password-info = Your credentials will only be stored locally on your computer
account-hub-sync-success = Thunderbird found some connected services
account-hub-email-added-success = Email account connected successfully