mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-12 03:48:33 +00:00
24 lines
438 B
Svelte
24 lines
438 B
Svelte
<script>
|
|
import { onMount, getContext } from 'svelte';
|
|
import { goto } from '$app/navigation';
|
|
import { user } from '$lib/stores';
|
|
|
|
import Dashboard from './Analytics/Dashboard.svelte';
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
let loaded = false;
|
|
|
|
onMount(async () => {
|
|
if ($user?.role !== 'admin') {
|
|
await goto('/');
|
|
}
|
|
loaded = true;
|
|
});
|
|
</script>
|
|
|
|
{#if loaded}
|
|
<div class="w-full h-full pb-2">
|
|
<Dashboard />
|
|
</div>
|
|
{/if}
|