Skip to content

Commit

Permalink
package view fix temp
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Oct 19, 2024
1 parent 067d5b1 commit fc21e24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file added next_app/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export default function PackageView() {
console.log(packageData)

async function checkInstalled() {
if (!project) return
if (!project.process) return
const res = await runLua(`return require("json").encode(apm.installed or {})`, project.process, [
{ name: "BetterIDEa-Function", value: "Packages" }
])
Expand Down Expand Up @@ -192,7 +194,8 @@ export default function PackageView() {
</div>
<div className="text-sm my-2">{packageData.Description}</div>
<div className="flex gap-1.5">
<Button variant="default" disabled={!globalState.activeProject || !project.process || installing} className="rounded-none h-6 p-3 text-white mr-auto" onClick={installPackage}>{project && project.process && installed[project.process][packageData.Vendor + "/" + packageData.Name] ? "Update" : "Install"} {installing && <Loader className="animate-spin ml-2" size={16} />}</Button>
{/* <Button variant="default" disabled={!globalState.activeProject || !project.process || installing} className="rounded-none h-6 p-3 text-white mr-auto" onClick={installPackage}>{(project && project.process && (installed[project.process][packageData.Vendor + "/" + packageData.Name])) ? "Update" : "Install"} {installing && <Loader className="animate-spin ml-2" size={16} />}</Button> */}
<Button variant="default" disabled={!globalState.activeProject || !project.process || installing} className="rounded-none h-6 p-3 text-white mr-auto" onClick={installPackage}>{"Install"} {installing && <Loader className="animate-spin ml-2" size={16} />}</Button>
<Link href={`https://apm.betteridea.dev/pkg?name=${packageData.Vendor}/${packageData.Name}`} target="_blank"><Button variant="default" className="rounded-none h-6 p-3 text-white">APM <ExternalLink size={16} className="ml-1 pb-0.5" /></Button></Link>
<Link href={packageData.Repository || "#"} target="_blank"><Button variant="default" className="rounded-none h-6 p-3 text-white">Repository <ExternalLink size={16} className="ml-1 pb-0.5" /></Button></Link>
</div>
Expand All @@ -211,4 +214,4 @@ export default function PackageView() {
}
</Markdown>
</div>
}
}

0 comments on commit fc21e24

Please sign in to comment.