fixed broken main navigation
This commit is contained in:
@@ -25,8 +25,10 @@ async function fetchModules(){
|
||||
}
|
||||
}
|
||||
|
||||
function go(path){
|
||||
router.navigate(path);
|
||||
function onclick(e){
|
||||
e.preventDefault();
|
||||
let href = e.target.getAttribute('href');
|
||||
if (href) router.navigate(href);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -50,15 +52,15 @@ onMount(fetchModules);
|
||||
<input type="text" bind:value={key} />
|
||||
<button type="submit">{t('search')}</button>
|
||||
</form>
|
||||
<a href="#" onclick={() => go('/user')}>{t('users')}</a>
|
||||
<a href="#" onclick={() => go('/company')}>{t('companies')}</a>
|
||||
<a href="#" onclick={() => go('/project')}>{t('projects')}</a>
|
||||
<a href="#" onclick={() => go('/task')}>{t('tasks')}</a>
|
||||
<a href="#" onclick={() => go('/document')}>{t('documents')}</a>
|
||||
<a href="#" onclick={() => go('/bookmark')}>{t('bookmarks')}</a>
|
||||
<a href="#" onclick={() => go('/notes')}>{t('notes')}</a>
|
||||
<a href="#" onclick={() => go('/time')}>{t('timetracking')}</a>
|
||||
<a href="#" onclick={() => go('/wiki')}>{t('wiki')}</a>
|
||||
<a href="/user" {onclick}>{t('users')}</a>
|
||||
<a href="/company" {onclick}>{t('companies')}</a>
|
||||
<a href="/project" {onclick}>{t('projects')}</a>
|
||||
<a href="/task" {onclick}>{t('tasks')}</a>
|
||||
<a href="/document" {onclick}>{t('documents')}</a>
|
||||
<a href="/bookmark" {onclick}>{t('bookmarks')}</a>
|
||||
<a href="/notes" {onclick}>{t('notes')}</a>
|
||||
<a href="/time" {onclick}>{t('timetracking')}</a>
|
||||
<a href="/wiki" {onclick}>{t('wiki')}</a>
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('tutorial')}</a>
|
||||
{#each modules as module,i}
|
||||
{#if module.name.trim()}<a href={module.url}>{module.name}</a>{/if}
|
||||
|
||||
Reference in New Issue
Block a user