mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(team) show loading spinner when team members are loading
This commit is contained in:
parent
5c0bd270ed
commit
802a835a2e
@ -38,7 +38,7 @@ const teamAsyncData = useAsyncData(async () => {
|
||||
return members.length > 0;
|
||||
}));
|
||||
|
||||
const credentials = membersByLocale[config.locale]
|
||||
const credentials = (membersByLocale[config.locale] ?? [])
|
||||
.filter((member) => member.credentials !== null)
|
||||
.toSorted((a, b) => {
|
||||
if (a.credentialsLevel! > b.credentialsLevel!) {
|
||||
@ -52,6 +52,8 @@ const teamAsyncData = useAsyncData(async () => {
|
||||
});
|
||||
|
||||
return { membersByLocale, credentials };
|
||||
}, {
|
||||
lazy: true,
|
||||
});
|
||||
|
||||
const membersByLocale = computed(() => teamAsyncData.data.value?.membersByLocale);
|
||||
@ -154,11 +156,13 @@ const credentials = computed(() => teamAsyncData.data.value?.credentials);
|
||||
|
||||
<AdPlaceholder :phkey="['content-0', 'content-mobile-0']" />
|
||||
|
||||
<section>
|
||||
<h3>
|
||||
<Icon v="user-friends" />
|
||||
<T>contact.team.members</T>
|
||||
</h3>
|
||||
<Loading :value="membersByLocale">
|
||||
<template #header>
|
||||
<h3>
|
||||
<Icon v="user-friends" />
|
||||
<T>contact.team.members</T>
|
||||
</h3>
|
||||
</template>
|
||||
|
||||
<template v-for="(members, locale) in membersByLocale">
|
||||
<h4 class="mt-4">
|
||||
@ -187,7 +191,7 @@ const credentials = computed(() => teamAsyncData.data.value?.credentials);
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</section>
|
||||
</Loading>
|
||||
|
||||
<AdPlaceholder :phkey="['content-1', 'content-mobile-1']" />
|
||||
</Page>
|
||||
|
Loading…
x
Reference in New Issue
Block a user