mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 03:41:51 +00:00
no-bug: Don't run welcome screen on headless mode (gh-12959)
This commit is contained in:
@@ -159,8 +159,13 @@ class ZenStartup {
|
||||
}
|
||||
|
||||
#checkForWelcomePage() {
|
||||
if (!Services.prefs.getBoolPref("zen.welcome-screen.seen", false)) {
|
||||
Services.prefs.setBoolPref("zen.welcome-screen.seen", true);
|
||||
const kWelcomeScreenSeenPref = "zen.welcome-screen.seen";
|
||||
if (Services.env.get("MOZ_HEADLESS")) {
|
||||
Services.prefs.setBoolPref(kWelcomeScreenSeenPref, true);
|
||||
return;
|
||||
}
|
||||
if (!Services.prefs.getBoolPref(kWelcomeScreenSeenPref, false)) {
|
||||
Services.prefs.setBoolPref(kWelcomeScreenSeenPref, true);
|
||||
Services.prefs.setStringPref(
|
||||
"zen.updates.last-build-id",
|
||||
Services.appinfo.appBuildID
|
||||
|
||||
@@ -13,35 +13,36 @@ export default function checkForZenUpdates() {
|
||||
const lastVersion = Services.prefs.getStringPref(ZEN_UPDATE_PREF, "");
|
||||
Services.prefs.setStringPref(ZEN_UPDATE_PREF, version);
|
||||
if (
|
||||
version !== lastVersion &&
|
||||
!gZenUIManager.testingEnabled &&
|
||||
Services.prefs.getBoolPref(ZEN_UPDATE_SHOW, true)
|
||||
version === lastVersion ||
|
||||
gZenUIManager.testingEnabled ||
|
||||
!Services.prefs.getBoolPref(ZEN_UPDATE_SHOW, true)
|
||||
) {
|
||||
const updateUrl = Services.prefs.getStringPref(
|
||||
"app.releaseNotesURL.prompt",
|
||||
""
|
||||
);
|
||||
createSidebarNotification({
|
||||
headingL10nId: "zen-sidebar-notification-updated-heading",
|
||||
links: [
|
||||
{
|
||||
url: Services.urlFormatter.formatURL(
|
||||
updateUrl.replace("%VERSION%", version)
|
||||
),
|
||||
l10nId: "zen-sidebar-notification-updated",
|
||||
special: true,
|
||||
icon: "chrome://browser/skin/zen-icons/heart-circle-fill.svg",
|
||||
},
|
||||
{
|
||||
action: () => {
|
||||
Services.obs.notifyObservers(window, "restart-in-safe-mode");
|
||||
},
|
||||
l10nId: "zen-sidebar-notification-restart-safe-mode",
|
||||
icon: "chrome://browser/skin/zen-icons/security-broken.svg",
|
||||
},
|
||||
],
|
||||
});
|
||||
return;
|
||||
}
|
||||
const updateUrl = Services.prefs.getStringPref(
|
||||
"app.releaseNotesURL.prompt",
|
||||
""
|
||||
);
|
||||
createSidebarNotification({
|
||||
headingL10nId: "zen-sidebar-notification-updated-heading",
|
||||
links: [
|
||||
{
|
||||
url: Services.urlFormatter.formatURL(
|
||||
updateUrl.replace("%VERSION%", version)
|
||||
),
|
||||
l10nId: "zen-sidebar-notification-updated",
|
||||
special: true,
|
||||
icon: "chrome://browser/skin/zen-icons/heart-circle-fill.svg",
|
||||
},
|
||||
{
|
||||
action: () => {
|
||||
Services.obs.notifyObservers(window, "restart-in-safe-mode");
|
||||
},
|
||||
l10nId: "zen-sidebar-notification-restart-safe-mode",
|
||||
icon: "chrome://browser/skin/zen-icons/security-broken.svg",
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
export async function createWindowUpdateAnimation() {
|
||||
|
||||
Reference in New Issue
Block a user