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