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 || !next.value ||
initialFetching.value || initialFetching.value ||
moreFetching.value || moreFetching.value ||
items.value.length === 0 items.value.length === 0 ||
!next.value.searchParams.has("pagination")
) )
return; return;
if (next.value.searchParams.has("pagination")) return;
const nextCursorRaw = next.value.searchParams.get("pagination") as string; const nextCursorRaw = next.value.searchParams.get("pagination") as string;
const nextCursorDecoded = { const nextCursorDecoded = {
...Object.fromEntries(new URLSearchParams(nextCursorRaw).entries()), ...Object.fromEntries(new URLSearchParams(nextCursorRaw).entries()),

View File

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

View File

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