Skip to content

Commit

Permalink
chore: add skeleton to versions page
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Aug 18, 2024
1 parent acb65f7 commit bedd811
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/pages/[user]/[project]/versions/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (!route.query.channel) {
if (!route.query.platform) {
filter.platforms.push(...platforms.value.map((p) => p.enumName));
}
const { versions } = useProjectVersions(
const { versions, versionsStatus } = useProjectVersions(
() => ({
project: route.params.project,
data: { ...requestParams.value, includeHiddenChannels: filter.channels?.length > 0 },
Expand Down Expand Up @@ -92,9 +92,10 @@ function getVisibilityTitle(visibility: Visibility) {
<div ref="pageChangeScrollAnchor" class="flex flex-wrap md:flex-nowrap gap-4">
<section class="basis-full md:basis-11/15 flex-grow">
<ul>
<Alert v-if="!versions || !versions.result || versions.result.length === 0" type="info"> {{ i18n.t("version.page.noVersions") }} </Alert>
<Skeleton v-if="versionsStatus === 'loading'" class="h-100" />
<Alert v-else-if="!versions?.result?.length" type="info"> {{ i18n.t("version.page.noVersions") }} </Alert>
<Pagination
v-else-if="versions"
v-else
ref="pagination"
:items="versions.result"
:server-pagination="versions.pagination"
Expand Down

0 comments on commit bedd811

Please sign in to comment.