update script and github star button

This commit is contained in:
Sam Heinz
2025-04-22 13:47:15 +10:00
parent 9b9868a664
commit da464737ab
2 changed files with 23 additions and 4 deletions

View File

@@ -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 (
<div className="flex flex-col lg:flex-row gap-6 w-full">
<div className="flex flex-col md:flex-row gap-6 flex-grow">
@@ -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 && (
<ResourceDisplay
title="Alpine"
{...item.install_methods.find((method) => method.type === "alpine")!.resources!}
{...item.install_methods.find((m) => m.type === "alpine")!.resources!}
/>
)}
<div className="mt-2 text-sm font-medium text-foreground">
{renderStatus()}
</div>
</div>
</div>
</div>

View File

@@ -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`}
>
<span className="absolute right-0 -mt-12 h-32 translate-x-12 rotate-12 bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-40" />
<div className="flex items-center">