fix(scripts): קישור "מקור" שבר על SCRIPTS.md בנתיב
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 3s
Lint — undefined names / undefined-names (pull_request) Successful in 10s

ה-gitea_url מצביע על קובץ scripts/SCRIPTS.md, אבל הקישור הפר-סקריפט הוסיף
אחריו את שם-הסקריפט → …/scripts/SCRIPTS.md/<name> (404 ב-Gitea). מתקן:
מסיר את שם-הקובץ האחרון מהבסיס לפני הוספת שם-הסקריפט, כך שהקישור מצביע
על …/scripts/<name>.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 04:55:12 +00:00
parent 4280bf2a21
commit 2c328d6906

View File

@@ -216,8 +216,12 @@ function ScriptTable({
<TableBody> <TableBody>
{rows.map((s) => { {rows.map((s) => {
const disabled = s.status === "archive" || s.status === "deleted"; const disabled = s.status === "archive" || s.status === "deleted";
// giteaBase is the SCRIPTS.md *file* URL (…/scripts/SCRIPTS.md); the
// per-script "מקור" link needs the scripts/ *directory*, so strip the
// trailing filename before appending the script name (else the link
// becomes …/scripts/SCRIPTS.md/<name> and 404s on Gitea).
const href = giteaBase const href = giteaBase
? `${giteaBase.replace(/\/$/, "")}/${s.name}` ? `${giteaBase.replace(/\/[^/]+$/, "")}/${s.name}`
: null; : null;
return ( return (
<TableRow <TableRow