|
|
@ -8,15 +8,14 @@ |
|
|
|
|
|
|
|
const tasksPromise: Promise<TasksFile> = loadTasks(); |
|
|
|
|
|
|
|
let selectedTask: string | null = null |
|
|
|
let finalSelect: boolean = false |
|
|
|
let selectedTask: string | null = null; |
|
|
|
let finalSelect: boolean = false; |
|
|
|
|
|
|
|
function clickTask(e: CustomEvent<TaskDescriptor>) { |
|
|
|
finalSelect = true |
|
|
|
finalSelect = true; |
|
|
|
} |
|
|
|
|
|
|
|
const hash = window.location.hash.substr(1); |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
@ -24,6 +23,7 @@ |
|
|
|
text-align: center; |
|
|
|
max-width: 240px; |
|
|
|
margin: 0 auto; |
|
|
|
min-height: 420px; |
|
|
|
} |
|
|
|
|
|
|
|
h1 { |
|
|
@ -41,14 +41,16 @@ |
|
|
|
</style> |
|
|
|
|
|
|
|
<main> |
|
|
|
{#if hash == "editor"} |
|
|
|
<TasksLoader promise={tasksPromise} let:data={t}> |
|
|
|
<Editor tasks={t} /> |
|
|
|
</TasksLoader> |
|
|
|
{:else} |
|
|
|
<TasksLoader promise={tasksPromise} let:data={t}> |
|
|
|
<TaskPanel bind:finalSelect={finalSelect} selectedTask={selectedTask} /> |
|
|
|
<Graph tasks={t} bind:selectedTask={selectedTask} on:selectTask={clickTask} /> |
|
|
|
</TasksLoader> |
|
|
|
{/if} |
|
|
|
{#if hash == 'editor'} |
|
|
|
<TasksLoader promise={tasksPromise} let:data={t}> |
|
|
|
<Editor tasks={t} /> |
|
|
|
</TasksLoader> |
|
|
|
{:else} |
|
|
|
<TasksLoader promise={tasksPromise} let:data={t}> |
|
|
|
<TaskPanel bind:finalSelect {selectedTask} /> |
|
|
|
<div style="height: 100%"> |
|
|
|
<Graph tasks={t} bind:selectedTask on:selectTask={clickTask} /> |
|
|
|
</div> |
|
|
|
</TasksLoader> |
|
|
|
{/if} |
|
|
|
</main> |
|
|
|