diff --git a/browser/components/preferences/in-content/sync.js b/browser/components/preferences/in-content/sync.js index 97573b3d0f36..252129f46c66 100644 --- a/browser/components/preferences/in-content/sync.js +++ b/browser/components/preferences/in-content/sync.js @@ -184,12 +184,6 @@ var gSyncPane = { this._populateComputerName(Weave.Service.clientsEngine.localName); }, - _closeSyncStatusMessageBox: function() { - document.getElementById("syncStatusMessage").removeAttribute("message-type"); - document.getElementById("syncStatusMessageTitle").textContent = ""; - document.getElementById("syncStatusMessageDescription").textContent = ""; - }, - _setupEventListeners: function() { function setEventListener(aId, aEventType, aCallback) { @@ -197,9 +191,6 @@ var gSyncPane = { .addEventListener(aEventType, aCallback.bind(gSyncPane)); } - setEventListener("syncStatusMessageClose", "command", function () { - gSyncPane._closeSyncStatusMessageBox(); - }); setEventListener("noAccountSetup", "click", function (aEvent) { aEvent.stopPropagation(); gSyncPane.openSetup(null); @@ -593,31 +584,23 @@ var gSyncPane = { }, verifyFirefoxAccount: function() { - this._closeSyncStatusMessageBox(); - let changesyncStatusMessage = (data) => { + let showVerifyNotification = (data) => { let isError = !data; - let syncStatusMessage = document.getElementById("syncStatusMessage"); - let syncStatusMessageTitle = document.getElementById("syncStatusMessageTitle"); - let syncStatusMessageDescription = document.getElementById("syncStatusMessageDescription"); let maybeNot = isError ? "Not" : ""; let sb = this._accountsStringBundle; let title = sb.GetStringFromName("verification" + maybeNot + "SentTitle"); let email = !isError && data ? data.email : ""; - let description = sb.formatStringFromName("verification" + maybeNot + "SentFull", [email], 1) - - syncStatusMessageTitle.textContent = title; - syncStatusMessageDescription.textContent = description; - let messageType = isError ? "verify-error" : "verify-success"; - syncStatusMessage.setAttribute("message-type", messageType); + let body = sb.formatStringFromName("verification" + maybeNot + "SentBody", [email], 1); + new Notification(title, { body }) } let onError = () => { - changesyncStatusMessage(); + showVerifyNotification(); }; let onSuccess = data => { if (data) { - changesyncStatusMessage(data); + showVerifyNotification(data); } else { onError(); } diff --git a/browser/components/preferences/in-content/sync.xul b/browser/components/preferences/in-content/sync.xul index df3ff1578ef9..331a5596c870 100644 --- a/browser/components/preferences/in-content/sync.xul +++ b/browser/components/preferences/in-content/sync.xul @@ -39,18 +39,6 @@ aria-label="&helpButton.label;"/> -