From da464737ab5d184b42d444b4b37107ef0229babd Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:47:15 +1000 Subject: [PATCH] update script and github star button --- .../app/scripts/_components/ScriptItem.tsx | 23 +++++++++++++++++-- .../components/ui/star-on-github-button.tsx | 4 ++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/scripts/_components/ScriptItem.tsx b/frontend/src/app/scripts/_components/ScriptItem.tsx index 7a2ba6d00..c30d47589 100644 --- a/frontend/src/app/scripts/_components/ScriptItem.tsx +++ b/frontend/src/app/scripts/_components/ScriptItem.tsx @@ -31,6 +31,22 @@ function ScriptHeader({ item }: { item: Script }) { const os = defaultInstallMethod?.resources?.os || "Proxmox Node"; const version = defaultInstallMethod?.resources?.version || ""; + // helper to map status symbols to labels + const renderStatus = () => { + switch (item.status) { + case "โŒ": + return "โŒ Broken"; + case "โœ…": + return "โœ… Working"; + case "๐Ÿšง": + return "๐Ÿšง Unported"; + case "๐Ÿงช": + return "๐Ÿงช Untested"; + default: + return "๐Ÿšง Unported"; + } + }; + return (
@@ -75,12 +91,15 @@ function ScriptHeader({ item }: { item: Script }) { hdd={defaultInstallMethod.resources.hdd} /> )} - {item.install_methods.find((method) => method.type === "alpine")?.resources && ( + {item.install_methods.find((m) => m.type === "alpine")?.resources && ( method.type === "alpine")!.resources!} + {...item.install_methods.find((m) => m.type === "alpine")!.resources!} /> )} +
+ {renderStatus()} +
diff --git a/frontend/src/components/ui/star-on-github-button.tsx b/frontend/src/components/ui/star-on-github-button.tsx index 340d59a47..28dc61944 100644 --- a/frontend/src/components/ui/star-on-github-button.tsx +++ b/frontend/src/components/ui/star-on-github-button.tsx @@ -13,7 +13,7 @@ export default function StarOnGithubButton() { const fetchStars = async () => { try { const res = await fetch( - `https://api.github.com/repos/asylumexp/${basePath}`, + `https://api.github.com/repos/asylumexp/Proxmox`, { next: { revalidate: 60 * 60 * 24 }, }, @@ -38,7 +38,7 @@ export default function StarOnGithubButton() { "group relative justify-center gap-2 rounded-md transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2", )} target="_blank" - href={`https://github.com/community-scripts/${basePath}`} + href={`https://github.com/asylumexp/Proxmox`} >