From ad7b2412f219088bff6de3d8f9b3b2e5287ce50a Mon Sep 17 00:00:00 2001 From: Alex Savelyev <91429106+alexdln@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:18:40 +0100 Subject: [PATCH] chore: update artemis noodle range (#2424) --- app/components/Landing/IntroHeader.vue | 19 ++++++++++++------- app/components/Noodle/index.ts | 3 +++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/components/Landing/IntroHeader.vue b/app/components/Landing/IntroHeader.vue index 1af2f0338..ce2f7919a 100644 --- a/app/components/Landing/IntroHeader.vue +++ b/app/components/Landing/IntroHeader.vue @@ -6,6 +6,7 @@ const { env } = useAppConfig().buildInfo const activeNoodlesData = ACTIVE_NOODLES.map(noodle => ({ key: noodle.key, date: noodle.date, + dateTo: noodle.dateTo, timezone: noodle.timezone, tagline: noodle.tagline, })) @@ -54,22 +55,26 @@ onPrehydrate(el => { } const currentActiveNoodles = activeNoodles.filter(noodle => { - const todayDate = new Intl.DateTimeFormat('en-US', { + const todayDate = new Date() + const todayDateRaw = new Intl.DateTimeFormat('en-US', { timeZone: noodle.timezone === 'auto' ? undefined : noodle.timezone, month: '2-digit', day: '2-digit', year: 'numeric', - }).format(new Date()) + }).format(todayDate) - const noodleDate = - noodle.date && - new Intl.DateTimeFormat('en-US', { + const noodleDateFrom = new Date(noodle.date!) + if (!noodle.dateTo) { + const noodleDateFromRaw = new Intl.DateTimeFormat('en-US', { timeZone: noodle.timezone === 'auto' ? undefined : noodle.timezone, month: '2-digit', day: '2-digit', year: 'numeric', - }).format(new Date(noodle.date)) - return todayDate === noodleDate + }).format(noodleDateFrom) + return todayDateRaw === noodleDateFromRaw + } + const noodleDateTo = new Date(noodle.dateTo!) + return todayDate >= noodleDateFrom && todayDate <= noodleDateTo }) if (!currentActiveNoodles.length) return diff --git a/app/components/Noodle/index.ts b/app/components/Noodle/index.ts index 3ec094b40..8e6206298 100644 --- a/app/components/Noodle/index.ts +++ b/app/components/Noodle/index.ts @@ -9,6 +9,8 @@ export type Noodle = { timezone?: string // Date for the noodle date?: string + // Date to for the noodle + dateTo?: string // Logo for the noodle - could be any component. Relative parent - intro section logo: Component // Show npmx tagline or not (default is true) @@ -41,6 +43,7 @@ export const ACTIVE_NOODLES: Noodle[] = [ key: 'artemis', logo: NoodleArtemisLogo, date: '2026-04-08T12:00:00Z', + dateTo: '2026-04-12T01:00:00Z', timezone: 'America/Los_Angeles', tagline: true, },