From 8c023ab05cc5956f2193b056850f60b8a2899080 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Tue, 16 May 2023 12:42:36 -0700 Subject: [PATCH] Add the ability to get badges for packages --- src/routes/pkg/[repo]/[name]/+page.svelte | 263 +++++++++++++--------- 1 file changed, 155 insertions(+), 108 deletions(-) diff --git a/src/routes/pkg/[repo]/[name]/+page.svelte b/src/routes/pkg/[repo]/[name]/+page.svelte index 442b5e2..1c513f4 100644 --- a/src/routes/pkg/[repo]/[name]/+page.svelte +++ b/src/routes/pkg/[repo]/[name]/+page.svelte @@ -1,123 +1,170 @@ - {$page.params.name} Package | LURE Web - + {$page.params.name} Package | LURE Web + -
+
- Back - {#await GetPkg({name: $page.params.name, repository: $page.params.repo})} -
- {:then pkg} -

{pkg.name}

-

{fullVer(pkg)}

- View lure.sh -
- - - {#if pkg.description != ""} - - - - - {/if} - {#if pkg.homepage != ""} - - - - - {/if} - {#if pkg.maintainer != ""} - - - - - {/if} - {#if pkg.licenses.length != 0} - - - - - {/if} - {#if pkg.architectures.length != 0} - - - - - {/if} - {#if pkg.conflicts.length != 0} - - - - - {/if} - {#if pkg.provides.length != 0} - - - - - {/if} - {#each [...objToMap(pkg.depends)] as [override, pkgList]} - - - - - {/each} - {#each [...objToMap(pkg.buildDepends)] as [override, pkgList]} - - - - - {/each} - - - - - -
Description:{pkg.description}
Homepage:{pkg.homepage}
Maintainer:{pkg.maintainer}
Licenses: - {#each pkg.licenses as license, index} - {#if license.startsWith('custom')} - {license}{#if index+1 < pkg.licenses.length}, {/if} - {:else} - {license}{#if index+1 < pkg.licenses.length}, {/if} - {/if} - {/each} -
Architectures:{pkg.architectures.join(', ')}
Conflicts:{pkg.conflicts.join(', ')}
Provides:{pkg.provides.join(', ')}
Depends ({override == "" ? "default" : override}):{pkgList.entries.join(', ')}
Build Depends ({override != "" ? override : "default"}):{pkgList.entries.join(', ')}
Repository:{pkg.repository}
-
- {:catch err} -
- Error: {err.msg} -
- {/await} + Back + {#await GetPkg({ name: $page.params.name, repository: $page.params.repo })} +
+ {:then pkg} +
-