refac: user list loading indicator

This commit is contained in:
Timothy Jaeryang Baek 2025-05-10 17:23:17 +04:00
parent 030b6b26af
commit 015ac2f532

View File

@ -32,13 +32,14 @@
import About from '$lib/components/chat/Settings/About.svelte';
import Banner from '$lib/components/common/Banner.svelte';
import Markdown from '$lib/components/chat/Messages/Markdown.svelte';
import Spinner from '$lib/components/common/Spinner.svelte';
const i18n = getContext('i18n');
let page = 1;
let users = [];
let total = 0;
let users = null;
let total = null;
let query = '';
let orderBy = 'created_at'; // default sort key
@ -181,6 +182,11 @@
</div>
{/if}
{#if users === null || total === null}
<div class="my-10">
<Spinner />
</div>
{:else}
<div class="mt-0.5 mb-2 gap-1 flex flex-col md:flex-row justify-between">
<div class="flex md:self-center text-lg font-medium px-0.5">
<div class="flex-shrink-0">
@ -522,6 +528,7 @@
</div>
<Pagination bind:page count={total} perPage={30} />
{/if}
{#if !$config?.license_metadata}
{#if total > 50}