Skip to content

Commit

Permalink
Refactor ScriptItem and InstallCommand components to improve conditio…
Browse files Browse the repository at this point in the history
…nal rendering based on item type. Updated text to clarify usage instructions for 'misc' type scripts.
  • Loading branch information
BramSuurdje committed Dec 19, 2024
1 parent 69a253f commit b9d4a83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/scripts/_components/ScriptItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function ScriptItem({
<div className="mt-4 rounded-lg border bg-accent/50">
<div className="flex gap-3 px-4 py-2">
<h2 className="text-lg font-semibold">
How to {item.type ? "install" : "use"}
How to {item.type == "misc" ? "use" : "install"}
</h2>
<Tooltips item={item} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ export default function InstallCommand({ item }: { item: Script }) {
time and minimal system resource usage. You are also obliged to
adhere to updates provided by the package maintainer.
</>
) : item.type ? (
) : item.type == "misc" ? (
<>
To create a new Proxmox VE {item.name}{" "}
{getDisplayValueFromType(item.type)}, run the command below in the
Proxmox VE Shell.
To use the {item.name} script, run the command below in the shell.
</>
) : (
<>
To use the {item.name} script, run the command below in the shell.
{" "}
To create a new Proxmox VE {item.name}{" "}
{getDisplayValueFromType(item.type)}, run the command below in the
Proxmox VE Shell.
</>
)}
</p>
Expand Down

0 comments on commit b9d4a83

Please sign in to comment.