Frontend: Fixed pagination bugs
ci/woodpecker/push/ociImagePush Pipeline is running Details

This commit is contained in:
Natty 2024-01-12 04:47:00 +01:00
parent 4834daceec
commit fdf9966ef6
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
3 changed files with 10 additions and 7 deletions

View File

@ -225,12 +225,11 @@ const fetchMore = async (): Promise<void> => {
!next.value ||
initialFetching.value ||
moreFetching.value ||
items.value.length === 0
items.value.length === 0 ||
!next.value.searchParams.has("pagination")
)
return;
if (next.value.searchParams.has("pagination")) return;
const nextCursorRaw = next.value.searchParams.get("pagination") as string;
const nextCursorDecoded = {
...Object.fromEntries(new URLSearchParams(nextCursorRaw).entries()),

View File

@ -318,7 +318,7 @@ definePageMetadata(
}
> .name {
flex-grow: 1;
flex-basis: 33%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -327,7 +327,7 @@ definePageMetadata(
}
> .value {
flex-grow: 2;
flex-grow: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

View File

@ -71,8 +71,8 @@ function extractHeaderRel(
continue;
}
for (const links of v.split(",").map(String.prototype.trim)) {
const [url, relPar] = links.split(";").map(String.prototype.trim);
for (const links of v.split(",").map((s) => s.trim())) {
const [url, relPar] = links.split(";").map((s) => s.trim());
if (!url || !relPar) {
continue;
}
@ -180,6 +180,10 @@ export class MagApiClient {
}
})
.catch((e) => {
console.error(
"Generic API error. This should not usually happen!",
e
);
throw {
status: -1,
code: "Client:GenericApiError",