diff --git a/app/globals.css b/app/globals.css index 8be4569..656ca0b 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1651,7 +1651,7 @@ kbd { color: var(--muted); border: 1px solid var(--line); border-radius: var(--r .fey-artifact-title { position: relative; z-index: 1; max-width: 12ch; margin: 0; font-family: var(--font-fraunces), serif; font-size: clamp(17px, 1.45vw, 22px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; } .fey-artifact-title-access { max-width: none; line-height: 1.3; } .fey-meteor-shower { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; } -.fey-meteor-shower i { position: absolute; width: 52px; height: 2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fey-red) 80%, transparent) 72%, var(--fey-red)); box-shadow: 0 0 3px color-mix(in srgb, var(--fey-red) 45%, transparent); opacity: 0; animation: fey-meteor 9s linear infinite; animation-delay: calc(var(--card-position, 0) * -1s); } +.fey-meteor-shower i { position: absolute; width: 52px; height: 2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fey-red) 80%, transparent) 72%, var(--fey-red)); box-shadow: 0 0 3px color-mix(in srgb, var(--fey-red) 45%, transparent); opacity: 0; animation: fey-meteor 9s linear infinite; animation-delay: calc(var(--card-position, 0) * 1s); } .fey-meteor-shower i:nth-child(1) { top: 18%; left: 10%; --meteor-x: 32px; --meteor-angle: 45deg; } .fey-meteor-shower i:nth-child(2) { top: 39%; left: 53%; --meteor-x: 32px; --meteor-angle: 45deg; } .fey-meteor-shower i:nth-child(3) { top: 57%; left: 24%; --meteor-x: 32px; --meteor-angle: 45deg; } diff --git a/components/SetupGuidePanel.tsx b/components/SetupGuidePanel.tsx index de7fcf4..6bad6b7 100644 --- a/components/SetupGuidePanel.tsx +++ b/components/SetupGuidePanel.tsx @@ -41,14 +41,16 @@ export function SetupGuidePanel({ guide }: { > )} - {/* If a platform exists but has no commands, and the source was checked, show the reviewed-empty message. */} - {(platform && installCommands.length === 0 && uninstallCommands.length === 0 && sourceChecked) ?
No shell commands are recorded for this OS.
: null} + {/* A download link already gives users an install route, so only show this when none is recorded. */} + {(platform && installCommands.length === 0 && uninstallCommands.length === 0 && sourceChecked && !platform.download_url) + ?No shell commands are recorded for this OS.
+ : null} {installCommands.length ?{platform.download_url - ? "No shell install command is listed. Use the official download." - : "Install instructions have not been reviewed."}
: null} + : (platform && !sourceChecked && !platform.download_url) + ?Install instructions have not been reviewed.
+ : null} {platform?.download_url ? Official download : null} diff --git a/tests/setup-guide-panel.test.tsx b/tests/setup-guide-panel.test.tsx new file mode 100644 index 0000000..2747075 --- /dev/null +++ b/tests/setup-guide-panel.test.tsx @@ -0,0 +1,74 @@ +import { renderToStaticMarkup } from "react-dom/server"; +import { describe, expect, it } from "vitest"; +import { SetupGuidePanel } from "../components/SetupGuidePanel"; +import type { SetupGuide } from "../lib/types"; + +function renderGuide(guide: SetupGuide) { + return renderToStaticMarkup(