Skip to content

Commit 82e6701

Browse files
committed
fix: snapshots fix & https for pkgcache
1 parent 3e20bfe commit 82e6701

12 files changed

Lines changed: 17592 additions & 11954 deletions

File tree

web/src/components/app.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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" | "package_id" | "description";
16+
type FieldType = "link" | "version" | "size" | "date" | "hash" | "files" | "number" | "metric" | "category" | "default" | "links" | "tags" | "repology" | "provides" | "string[]" | "license" | "note" | "package_id" | "description" | "snapshots";
1717

1818
interface ResolverField {
1919
label: string;
@@ -36,7 +36,7 @@ const resolver: { [key: string]: ResolverField } = {
3636
repology: { label: "Repology", type: "repology" },
3737
appstream: { label: "AppStream", type: "link" },
3838
license: { label: "License", type: "license" },
39-
snapshots: { label: "Snapshots", type: "version" },
39+
snapshots: { label: "Snapshots", type: "snapshots" },
4040
tag: { label: "Tags", type: "tags" },
4141
app_id: { label: "Application ID", type: "default" },
4242
version: { label: "Version", type: "version" },
@@ -94,9 +94,9 @@ function Show({ value, Key, props }: { value: any, props: AppProps, Key?: string
9494
case "link":
9595
if (typeof value === "string" && !value.startsWith("http")) {
9696
return (
97-
<a href={`http://${value}`} target="_blank" rel="noreferrer"
97+
<a href={`https://${value}`} target="_blank" rel="noreferrer"
9898
className="underline underline-offset-4">
99-
http://{value}
99+
https://{value}
100100
</a>
101101
);
102102
}
@@ -293,7 +293,7 @@ function Show({ value, Key, props }: { value: any, props: AppProps, Key?: string
293293

294294
case "package_id":
295295
return (
296-
<span className="font-mono text-gray-600 dark:text-gray-400">{value}</span>
296+
<span className="font-mono text-gray-600 dark:text-gray-400">{value}</span>
297297
);
298298

299299
case "description":
@@ -318,6 +318,18 @@ function Show({ value, Key, props }: { value: any, props: AppProps, Key?: string
318318
}
319319
return <span>{value}</span>;
320320

321+
case "snapshots":
322+
const snapshots = Array.isArray(value) ? value : [value];
323+
return (
324+
<div className="flex flex-wrap gap-1">
325+
{snapshots.map((snap) => (
326+
<Badge key={snap} className="bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-100">
327+
{snap}
328+
</Badge>
329+
))}
330+
</div>
331+
);
332+
321333
default:
322334
if (typeof value === "string" && value.startsWith("http")) {
323335
return (

web/src/metadata_bincache_aarch64-linux.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

web/src/metadata_bincache_x86_64-linux.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

web/src/metadata_soarpkgs_[category].json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

web/src/pages/repo/bincache/aarch64-linux/_apps.json

Lines changed: 4970 additions & 4837 deletions
Large diffs are not rendered by default.

web/src/pages/repo/bincache/aarch64-linux/_family.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,12 @@
11851185
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/delta/delta"
11861186
]
11871187
],
1188+
"aarch64-linux/deoptimizer": [
1189+
[
1190+
"deoptimizer",
1191+
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/deoptimizer/deoptimizer"
1192+
]
1193+
],
11881194
"aarch64-linux/desktop-file-utils": [
11891195
[
11901196
"desktop-file-validate",
@@ -1666,13 +1672,13 @@
16661672
]
16671673
],
16681674
"aarch64-linux/geonet": [
1669-
[
1670-
"geoping",
1671-
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/geonet/geoping"
1672-
],
16731675
[
16741676
"geodns",
16751677
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/geonet/geodns"
1678+
],
1679+
[
1680+
"geoping",
1681+
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/geonet/geoping"
16761682
]
16771683
],
16781684
"aarch64-linux/gettext": [
@@ -3100,25 +3106,25 @@
31003106
"tload",
31013107
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/tload"
31023108
],
3109+
[
3110+
"ps",
3111+
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/ps"
3112+
],
31033113
[
31043114
"free",
31053115
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/free"
31063116
],
3117+
[
3118+
"pwdx",
3119+
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/pwdx"
3120+
],
31073121
[
31083122
"pmap",
31093123
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/pmap"
31103124
],
31113125
[
31123126
"kill",
31133127
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/kill"
3114-
],
3115-
[
3116-
"ps",
3117-
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/ps"
3118-
],
3119-
[
3120-
"pwdx",
3121-
"https://pkgs.pkgforge.dev/repo/bincache/aarch64-linux/procps/pwdx"
31223128
]
31233129
],
31243130
"aarch64-linux/proot": [

0 commit comments

Comments
 (0)