refactored translations, preparing sending of document
This commit is contained in:
@@ -13,7 +13,7 @@ async function fetchModules(){
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
const arr = await resp.json();
|
||||
for (let entry of arr) modules.push({name:t('menu.'+entry.module),url:entry.url});
|
||||
for (let entry of arr) modules.push({name:t(entry.module),url:entry.url});
|
||||
} else {
|
||||
console.log('error');
|
||||
}
|
||||
@@ -28,13 +28,13 @@ onMount(fetchModules);
|
||||
</style>
|
||||
|
||||
<nav>
|
||||
<a onclick={() => router.navigate('/user')}>{t('menu.users')}</a>
|
||||
<a onclick={() => router.navigate('/document')}>{t('menu.documents')}</a>
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('menu.tutorial')}</a>
|
||||
<a onclick={() => router.navigate('/user')}>{t('users')}</a>
|
||||
<a onclick={() => router.navigate('/document')}>{t('documents')}</a>
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('tutorial')}</a>
|
||||
{#each modules as module,i}
|
||||
<a href={module.url}>{module.name}</a>
|
||||
{/each}
|
||||
{#if user.name }
|
||||
<a onclick={logout}>{t('menu.logout')}</a>
|
||||
<a onclick={logout}>{t('logout')}</a>
|
||||
{/if}
|
||||
</nav>
|
||||
Reference in New Issue
Block a user