Worked more on the welcome screen

This commit is contained in:
mr. m
2025-02-16 18:02:45 +01:00
parent d67b0d3f57
commit c708d0ccf2
4 changed files with 64 additions and 8 deletions

2
l10n

Submodule l10n updated: 5caffd5c49...fc96ddf3c6

View File

@@ -121,9 +121,7 @@
},
_checkForWelcomePage() {
if (
!Services.prefs.getBoolPref('zen.welcome-screen.seen', false)
) {
if (!Services.prefs.getBoolPref('zen.welcome-screen.seen', false)) {
//Services.prefs.setBoolPref('zen.welcome-screen.seen', true);
console.log('ZenStartup: Show welcome page');
Services.scriptloader.loadSubScript('chrome://browser/content/zen-components/ZenWelcome.mjs', window);

View File

@@ -94,11 +94,16 @@
margin: 0 0 1.1rem 0;
color: light-dark(rgba(0, 0, 0, 0.6), rgba(255, 255, 255, 0.6));
}
& > * {
opacity: 0;
}
}
& button {
justify-content: center;
align-items: center;
opacity: 0;
}
#zen-welcome-page-content {

View File

@@ -62,7 +62,7 @@
(description2 ? `<html:p>${description2}</html:p>` : '');
await animate(
'#zen-welcome-page-sidebar-content > *',
{ x: ['100%', 0], filter: ['blur(2px)', 'blur(0px)'] },
{ x: ['150%', 0], filter: ['blur(2px)', 'blur(0px)'], opacity: [0, 1] },
{
delay: getMotion().stagger(0.05, { startDelay: 0.3 }),
type: 'spring',
@@ -91,7 +91,7 @@
}
await animate(
'#zen-welcome-page-sidebar-buttons button',
{ x: ['100%', 0], filter: ['blur(2px)', 'blur(0px)'] },
{ x: ['150%', 0], filter: ['blur(2px)', 'blur(0px)'], opacity: [0, 1] },
{
delay: getMotion().stagger(0.1, { startDelay: 0.4 }),
type: 'spring',
@@ -115,7 +115,7 @@
async fadeOutButtons() {
await animate(
'#zen-welcome-page-sidebar-buttons button',
{ x: [0, '-100%'], filter: ['blur(0px)', 'blur(2px)'] },
{ x: [0, '-150%'], filter: ['blur(0px)', 'blur(2px)'], opacity: [1, 0] },
{
type: 'spring',
bounce: 0,
@@ -129,7 +129,7 @@
async fadeOutTitles() {
await animate(
'#zen-welcome-page-sidebar-content > *',
{ x: [0, '-100%'], filter: ['blur(0px)', 'blur(2px)'] },
{ x: [0, '-150%'], filter: ['blur(0px)', 'blur(2px)'], opacity: [1, 0] },
{
delay: getMotion().stagger(0.05, { startDelay: 0.3 }),
type: 'spring',
@@ -247,6 +247,49 @@
},
fadeOut() {},
},
{
text: [
{
id: 'zen-welcome-initial-essentials-title',
},
{
id: 'zen-welcome-initial-essentials-description-1',
},
{
id: 'zen-welcome-initial-essentials-description-2',
},
],
buttons: [
{
l10n: 'zen-welcome-next-action',
onclick: async () => {
return true;
},
},
],
fadeIn() {},
fadeOut() {},
},
{
text: [
{
id: 'zen-welcome-workspace-colors-title',
},
{
id: 'zen-welcome-workspace-colors-description',
},
],
buttons: [
{
l10n: 'zen-welcome-next-action',
onclick: async () => {
return true;
},
},
],
fadeIn() {},
fadeOut() {},
},
{
text: [
{
@@ -315,7 +358,17 @@
});
}
function centerWindowOnScreen() {
var xOffset = screen.availWidth / 2 - window.outerWidth / 2;
var yOffset = screen.availHeight / 2 - window.outerHeight / 2;
xOffset = xOffset > 0 ? xOffset : 0;
yOffset = yOffset > 0 ? yOffset : 0;
window.moveTo(xOffset, yOffset);
}
function startZenWelcome() {
centerWindowOnScreen();
clearBrowserElements();
initializeZenWelcome();
animateInitialStage();