@@ -13,7 +13,7 @@ interface AppProps {
1313 downloadable ?: boolean ;
1414}
1515
16- type FieldType = "link" | "version" | "size" | "date" | "hash" | "files" | "number" | "metric" | "category" | "default" | "links" | "tags" | "repology" | "provides" | "string[]" | "license" | "note" ;
16+ type FieldType = "link" | "version" | "size" | "date" | "hash" | "files" | "number" | "metric" | "category" | "default" | "links" | "tags" | "repology" | "provides" | "string[]" | "license" | "note" | "package_id" ;
1717
1818interface ResolverField {
1919 label : string ;
@@ -26,7 +26,7 @@ const resolver: { [key: string]: ResolverField } = {
2626 pkg : { label : "Package" , type : "default" } ,
2727 pkg_family : { label : "Package Family" , type : "default" } ,
2828 pkg_name : { label : "Package Name" , type : "default" } ,
29- pkg_id : { label : "Package ID" , type : "default " } ,
29+ pkg_id : { label : "Package ID" , type : "package_id " } ,
3030 bsum : { label : "BLAKE3SUM" , type : "hash" } ,
3131 repology : { label : "Repology" , type : "repology" } ,
3232 appstream : { label : "AppStream" , type : "link" } ,
@@ -276,6 +276,11 @@ function Show({ value, Key, props }: { value: any, props: AppProps, Key?: string
276276 </ div >
277277 ) ;
278278
279+ case "package_id" :
280+ return (
281+ < span className = "font-mono text-gray-600 dark:text-gray-400" > { value } </ span >
282+ ) ;
283+
279284 default :
280285 if ( typeof value === "string" && value . startsWith ( "http" ) ) {
281286 return (
@@ -342,7 +347,7 @@ export default function App({ data, logs: build, repo, downloadable = true }: Ap
342347 </ div >
343348
344349 < div className = "lg:w-[15%] lg:sticky lg:top-3 flex w-full flex-col space-y-4" >
345- < div className = "flex flex-col items-center space-y-2 p-3 rounded-lg border bg-card" >
350+ { data . pkg_name && data . pkg_id && ( < div className = "flex flex-col items-center space-y-2 p-3 rounded-lg border bg-card" >
346351 < h2 className = "text-lg font-semibold flex items-center space-x-2" >
347352 < Download className = "text-blue-600 dark:text-blue-400" />
348353 < span > Install Package</ span >
@@ -377,7 +382,7 @@ export default function App({ data, logs: build, repo, downloadable = true }: Ap
377382 < a href = "https://github.com/pkgforge/soar" target = "_blank" rel = "noreferrer" className = "text-xs underline text-muted-foreground text-center" >
378383 Note: Requires soar to be installed
379384 </ a >
380- </ div >
385+ </ div > ) }
381386
382387 { build && (
383388 < div className = "flex flex-col items-center space-y-2 p-3 rounded-lg border bg-card" >
0 commit comments