preparing svelte login, mastered translations
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { loadTranslation } from './translations.svelte.js'
|
||||
import { loadTranslation } from './translations.svelte.js';
|
||||
import { user } from './user.svelte.js';
|
||||
|
||||
let translations_ready = false;
|
||||
onMount(async () => {
|
||||
await loadTranslation('de','Login');
|
||||
@@ -12,10 +14,13 @@
|
||||
import Menu from "./Components/Menu.svelte";
|
||||
</script>
|
||||
|
||||
{#if translations_ready}
|
||||
{#if translations_ready }
|
||||
{#if user.username }
|
||||
<Menu />
|
||||
<Homepage />
|
||||
{:else}
|
||||
<Login />
|
||||
{/if}
|
||||
{:else}
|
||||
<p>Loading translations...</p>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user