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,7 +182,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="mt-0.5 mb-2 gap-1 flex flex-col md:flex-row justify-between">
|
{#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 md:self-center text-lg font-medium px-0.5">
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
{$i18n.t('Users')}
|
{$i18n.t('Users')}
|
||||||
@ -243,11 +249,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full rounded-sm pt-0.5"
|
class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full rounded-sm pt-0.5"
|
||||||
>
|
>
|
||||||
<table
|
<table
|
||||||
class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto max-w-full rounded-sm"
|
class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto max-w-full rounded-sm"
|
||||||
>
|
>
|
||||||
@ -515,13 +521,14 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" text-gray-500 text-xs mt-1.5 text-right">
|
<div class=" text-gray-500 text-xs mt-1.5 text-right">
|
||||||
ⓘ {$i18n.t("Click on the user role button to change a user's role.")}
|
ⓘ {$i18n.t("Click on the user role button to change a user's role.")}
|
||||||
</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