From 86d65c72f056b5f31f7a3558e8dcb64bd41b9c00 Mon Sep 17 00:00:00 2001 From: tyow Date: Mon, 30 Mar 2026 14:37:26 -0400 Subject: [PATCH 1/2] colorless version display implementation --- website/src/repl/components/panel/Panel.jsx | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/website/src/repl/components/panel/Panel.jsx b/website/src/repl/components/panel/Panel.jsx index 3b4dd5482..76987d1a4 100644 --- a/website/src/repl/components/panel/Panel.jsx +++ b/website/src/repl/components/panel/Panel.jsx @@ -44,6 +44,25 @@ export function LogoButton({ context, isEmbedded }) { export function MainPanel({ context, isEmbedded = false, className }) { const { isZen, isButtonRowHidden, fontFamily } = useSettings(); + let loc = window.location; + let ver = 'unofficial'; + let hot = false; + let b = loc.hostname.match(/^(.+)\.(strudel)/); + if (/(strudel)/.test(loc.hostname)) { + // if there's no text before 'strudel', it's warm, otherwise use the text before strudel + ver = b ? b[1] : 'warm'; + } else { + // match both versions of localhost + if (/(localhost)|(127.0.0.1)/.test(loc.hostname)) ver = 'dev'; + } + let pr = ver.match(/pr-([0-9]+)/); + if (pr) { + pr = pr[1]; + ver = `hot: ${pr}`; + hot = true; + pr = `https://codeberg.org/uzu/strudel/pulls/${pr}`; + } + return (