summaryrefslogtreecommitdiffstats
path: root/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs')
-rw-r--r--browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs100
1 files changed, 100 insertions, 0 deletions
diff --git a/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs b/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs
index ceded6b755..3cfbbb3f34 100644
--- a/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs
+++ b/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs
@@ -1210,6 +1210,106 @@ const BASE_MESSAGES = () => [
id: "defaultBrowserCheck",
},
},
+ {
+ id: "SET_DEFAULT_BROWSER_GUIDANCE_NOTIFICATION_WIN10",
+ template: "toast_notification",
+ content: {
+ title: {
+ string_id: "default-browser-guidance-notification-title",
+ },
+ body: {
+ string_id:
+ "default-browser-guidance-notification-body-instruction-win10",
+ },
+ launch_action: {
+ type: "OPEN_URL",
+ data: {
+ args: "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/win-set-firefox-default-browser",
+ where: "tabshifted",
+ },
+ },
+ requireInteraction: true,
+ actions: [
+ {
+ action: "info-page",
+ title: {
+ string_id: "default-browser-guidance-notification-info-page",
+ },
+ launch_action: {
+ type: "OPEN_URL",
+ data: {
+ args: "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/win-set-firefox-default-browser",
+ where: "tabshifted",
+ },
+ },
+ },
+ {
+ action: "dismiss",
+ title: {
+ string_id: "default-browser-guidance-notification-dismiss",
+ },
+ windowsSystemActivationType: true,
+ },
+ ],
+ tag: "set-default-guidance-notification",
+ },
+ // Both Windows 10 and 11 return `os.windowsVersion == 10.0`. We limit to
+ // only Windows 10 with `os.windowsBuildNumber < 22000`. We need this due to
+ // Windows 10 and 11 having substantively different UX for Windows Settings.
+ targeting:
+ "os.isWindows && os.windowsVersion >= 10.0 && os.windowsBuildNumber < 22000",
+ trigger: { id: "deeplinkedToWindowsSettingsUI" },
+ },
+ {
+ id: "SET_DEFAULT_BROWSER_GUIDANCE_NOTIFICATION_WIN11",
+ template: "toast_notification",
+ content: {
+ title: {
+ string_id: "default-browser-guidance-notification-title",
+ },
+ body: {
+ string_id:
+ "default-browser-guidance-notification-body-instruction-win11",
+ },
+ launch_action: {
+ type: "OPEN_URL",
+ data: {
+ args: "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/win-set-firefox-default-browser",
+ where: "tabshifted",
+ },
+ },
+ requireInteraction: true,
+ actions: [
+ {
+ action: "info-page",
+ title: {
+ string_id: "default-browser-guidance-notification-info-page",
+ },
+ launch_action: {
+ type: "OPEN_URL",
+ data: {
+ args: "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/win-set-firefox-default-browser",
+ where: "tabshifted",
+ },
+ },
+ },
+ {
+ action: "dismiss",
+ title: {
+ string_id: "default-browser-guidance-notification-dismiss",
+ },
+ windowsSystemActivationType: true,
+ },
+ ],
+ tag: "set-default-guidance-notification",
+ },
+ // Both Windows 10 and 11 return `os.windowsVersion == 10.0`. We limit to
+ // only Windows 11 with `os.windowsBuildNumber >= 22000`. We need this due to
+ // Windows 10 and 11 having substantively different UX for Windows Settings.
+ targeting:
+ "os.isWindows && os.windowsVersion >= 10.0 && os.windowsBuildNumber >= 22000",
+ trigger: { id: "deeplinkedToWindowsSettingsUI" },
+ },
];
// Eventually, move Feature Callout messages to their own provider