mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: user list loading indicator
This commit is contained in:
parent
030b6b26af
commit
015ac2f532
@ -32,13 +32,14 @@
|
|||||||
import About from '$lib/components/chat/Settings/About.svelte';
|
import About from '$lib/components/chat/Settings/About.svelte';
|
||||||
import Banner from '$lib/components/common/Banner.svelte';
|
import Banner from '$lib/components/common/Banner.svelte';
|
||||||
import Markdown from '$lib/components/chat/Messages/Markdown.svelte';
|
import Markdown from '$lib/components/chat/Messages/Markdown.svelte';
|
||||||
|
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
let page = 1;
|
let page = 1;
|
||||||
|
|
||||||
let users = [];
|
let users = null;
|
||||||
let total = 0;
|
let total = null;
|
||||||
|
|
||||||
let query = '';
|
let query = '';
|
||||||
let orderBy = 'created_at'; // default sort key
|
let orderBy = 'created_at'; // default sort key
|
||||||
@ -181,6 +182,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/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="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 md:self-center text-lg font-medium px-0.5">
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
@ -522,6 +528,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Pagination bind:page count={total} perPage={30} />
|
<Pagination bind:page count={total} perPage={30} />
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if !$config?.license_metadata}
|
{#if !$config?.license_metadata}
|
||||||
{#if total > 50}
|
{#if total > 50}
|
||||||
|
Loading…
Reference in New Issue
Block a user