open-webui/src/routes/error/+page.svelte

61 lines
1.6 KiB
Svelte
Raw Normal View History

2023-12-26 06:14:06 +00:00
<script>
import { goto } from '$app/navigation';
2024-02-24 01:12:19 +00:00
import { WEBUI_NAME, config } from '$lib/stores';
import { onMount, getContext } from 'svelte';
const i18n = getContext('i18n');
2023-12-26 06:14:06 +00:00
let loaded = false;
onMount(async () => {
if ($config) {
await goto('/');
}
loaded = true;
});
</script>
{#if loaded}
<div class="absolute w-full h-full flex z-50">
2025-02-16 03:27:25 +00:00
<div class="absolute rounded-xl w-full h-full backdrop-blur-sm flex justify-center">
2023-12-26 06:14:06 +00:00
<div class="m-auto pb-44 flex flex-col justify-center">
<div class="max-w-md">
<div class="text-center text-2xl font-medium z-50">
{$i18n.t('{{webUIName}} Backend Required', { webUIName: $WEBUI_NAME })}
</div>
2023-12-26 06:14:06 +00:00
<div class=" mt-4 text-center text-sm w-full">
{$i18n.t(
"Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend."
)}
2023-12-27 01:51:30 +00:00
<br class=" " />
<br class=" " />
<a
2025-11-24 02:17:14 +00:00
class=" font-medium underline"
2024-02-19 19:47:37 +00:00
href="https://github.com/open-webui/open-webui#how-to-install-"
target="_blank">{$i18n.t('See readme.md for instructions')}</a
2023-12-27 01:51:30 +00:00
>
{$i18n.t('or')}
2025-11-24 02:17:14 +00:00
<a class=" font-medium underline" href="https://discord.gg/5rJgQTnV4s" target="_blank"
>{$i18n.t('join our Discord for help.')}</a
2023-12-27 01:51:30 +00:00
>
2023-12-26 06:14:06 +00:00
</div>
<div class=" mt-6 mx-auto relative group w-fit">
<button
2025-08-16 23:24:05 +00:00
class="relative z-20 flex px-5 py-2 rounded-full bg-gray-100 hover:bg-gray-200 transition font-medium text-sm text-black"
2023-12-26 11:28:30 +00:00
on:click={() => {
location.href = '/';
}}
2023-12-26 06:14:06 +00:00
>
{$i18n.t('Check Again')}
2023-12-26 06:14:06 +00:00
</button>
</div>
</div>
</div>
</div>
</div>
{/if}