@@ -16,7 +16,7 @@
|
|||||||
</NavigationMenu.Item>
|
</NavigationMenu.Item>
|
||||||
|
|
||||||
<NavigationMenu.Item>
|
<NavigationMenu.Item>
|
||||||
<NavigationMenu.Link href="/packages/" class="text-sm font-medium">
|
<NavigationMenu.Link href="/packages.html" class="text-sm font-medium">
|
||||||
{m.nav_packages()}
|
{m.nav_packages()}
|
||||||
</NavigationMenu.Link>
|
</NavigationMenu.Link>
|
||||||
</NavigationMenu.Item>
|
</NavigationMenu.Item>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export const prerender = true
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
<Table.Body>
|
<Table.Body>
|
||||||
{#each results as item}
|
{#each results as item}
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell><a href={`/packages/pkginfo/?pkgIdent=${strPkgIdent(item)}&mirrorName=${selectedMirror}`}>{item.name}</a></Table.Cell>
|
<Table.Cell><a href={`/packages/pkginfo?pkgIdent=${strPkgIdent(item)}&mirrorName=${selectedMirror}`}>{item.name}</a></Table.Cell>
|
||||||
<Table.Cell>{item.version}</Table.Cell>
|
<Table.Cell>{item.version}</Table.Cell>
|
||||||
<Table.Cell>{item.arch}</Table.Cell>
|
<Table.Cell>{item.arch}</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function baseUrlForMirror(mirror: string): string {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
export async function getRepoDb(url: string): Promise<any> {
|
export async function getRepoDb(url: string): Promise<any> {
|
||||||
const sqlPromise = initSqlJs({ locateFile: (file: string) => `/node_modules/sql.js/dist/${file}` });
|
const sqlPromise = initSqlJs();
|
||||||
const dataPromise = fetch(url).then((res) => res.arrayBuffer());
|
const dataPromise = fetch(url).then((res) => res.arrayBuffer());
|
||||||
const [SQL, data] = await Promise.all([sqlPromise, dataPromise]);
|
const [SQL, data] = await Promise.all([sqlPromise, dataPromise]);
|
||||||
return new SQL.Database(new Uint8Array(data));
|
return new SQL.Database(new Uint8Array(data));
|
||||||
|
|||||||
@@ -72,9 +72,9 @@
|
|||||||
<p>{m.pkginfo_download_size()}: {pkgInfo ? formatSize(pkgInfo['download_size']) : ""}</p>
|
<p>{m.pkginfo_download_size()}: {pkgInfo ? formatSize(pkgInfo['download_size']) : ""}</p>
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
<Card.Footer>
|
<Card.Footer>
|
||||||
<a href="{baseUrl}/{(pkgIdent ? strPkgIdent(pkgIdent) : '') + '.pkg'}" download>
|
<Button onclick={() => {
|
||||||
<Button>{m.pkginfo_download_action()}</Button>
|
window.location.href = `${baseUrl}/${(pkgIdent ? strPkgIdent(pkgIdent) : '') + '.pkg'}`;
|
||||||
</a>
|
}}>{m.pkginfo_download_action()}</Button>
|
||||||
</Card.Footer>
|
</Card.Footer>
|
||||||
</Card.Root>
|
</Card.Root>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user