diff --git a/web/src/lib/composerSnow.js b/web/src/lib/composerSnow.js index 99a7e719..82efd450 100644 --- a/web/src/lib/composerSnow.js +++ b/web/src/lib/composerSnow.js @@ -74,11 +74,11 @@ export function paintFrost(canvas, seed, dark, width, height) { } // A small crisscross of crystals fills the corner itself. const mesh = Math.min(24, height * .3); - for (let i = 0, count = mesh * 1.3; i < count; i++) { + for (let i = 0, count = mesh * 1.8; i < count; i++) { const angle = random() * Math.PI / 2; const reach = 2 + random() ** 1.2 * mesh; needle(5 + reach * Math.cos(angle), 4 + reach * Math.sin(angle), - angle + (random() - .5) * 1.4, 3 + random() * 6, .28 + .32 * (1 - reach / (mesh + 2))); + angle + (random() - .5) * 1.4, 2.5 + random() * 4.5, .18 + .26 * (1 - reach / (mesh + 2))); } } diff --git a/web/src/lib/themeHud.test.js b/web/src/lib/themeHud.test.js index 2e1977a1..f5c29869 100644 --- a/web/src/lib/themeHud.test.js +++ b/web/src/lib/themeHud.test.js @@ -236,7 +236,8 @@ await run('themeHud.css scrollbar rules avoid the :root prefix', () => { } }); -// The motion switch also controls the main composer's winter decoration. +// 场景:首页输入框的冬季下雪 / 霜花装饰按本地日期开关(同样受「动态效果」开关控制)。 +// 期望:12 月 1 日零点起显示,一直到 1 月 1 日当天结束;11 月 30 日深夜和 1 月 2 日都不显示。 await run('composer snow starts in December and includes New Year’s Day in local time', () => { for (const year of [2026, 2027]) { assert.equal(isWinterHoliday(new Date(year, 10, 30, 23, 59)), false); @@ -246,6 +247,17 @@ await run('composer snow starts in December and includes New Year’s Day in loc } }); +// 场景:新建任务首页的输入框(hero)发出第一条消息后,会话页底部换成普通输入框。 +// 期望:下雪 / 霜花只挂在 hero 输入框上;会话页底部的主输入框同样带 mainComposer,但不挂。 +// 回归:之前按 mainComposer 挂载,会话页底部输入框上也会下雪、角上也有霜。 +await run('composer snow is mounted only on the home hero composer', () => { + const inputBar = read('../components/InputBar.jsx'); + assert.match(inputBar, /\{isHero && { const settings = read('../components/SettingsPage.jsx'); assert.match(settings, /themeVariantOptions\.length > 0 &&/);