|
@ -2,9 +2,9 @@ |
|
|
import { getContext } from "svelte"; |
|
|
import { getContext } from "svelte"; |
|
|
|
|
|
|
|
|
import Graph from "./Graph.svelte"; |
|
|
import Graph from "./Graph.svelte"; |
|
|
import { nonNull } from "./helpers"; |
|
|
import { nonNull, saveToLocalDisk } from "./helpers"; |
|
|
import type { TaskDescriptor, TasksFile } from "./tasks"; |
|
|
import type { TaskDescriptor, TasksFile } from "./tasks"; |
|
|
import { saveTasks, getCategories } from "./tasks"; |
|
|
import { saveTasks, getCategories, tasksToString } from "./tasks"; |
|
|
import TaskDisplay from "./TaskDisplay.svelte"; |
|
|
import TaskDisplay from "./TaskDisplay.svelte"; |
|
|
import TaskDetailEditor from "./TaskDetailEditor.svelte"; |
|
|
import TaskDetailEditor from "./TaskDetailEditor.svelte"; |
|
|
import { forceSimulation } from "./force-simulation"; |
|
|
import { forceSimulation } from "./force-simulation"; |
|
@ -62,6 +62,10 @@ |
|
|
await saveTasks(tasks); |
|
|
await saveTasks(tasks); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function saveLocally() { |
|
|
|
|
|
saveToLocalDisk("tasks.json", tasksToString(tasks)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function openTaskDetailEditorButton(e: CustomEvent<TaskDescriptor>) { |
|
|
function openTaskDetailEditorButton(e: CustomEvent<TaskDescriptor>) { |
|
|
openTaskDetailEditor(e.detail); |
|
|
openTaskDetailEditor(e.detail); |
|
|
} |
|
|
} |
|
@ -260,6 +264,7 @@ |
|
|
<h3>Toolbox</h3> |
|
|
<h3>Toolbox</h3> |
|
|
<div> |
|
|
<div> |
|
|
<button on:click={saveCurrentState}>Uložit aktuální stav</button> |
|
|
<button on:click={saveCurrentState}>Uložit aktuální stav</button> |
|
|
|
|
|
<button on:click={saveLocally}>Stáhnout data</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="gap" /> |
|
|
<div class="gap" /> |
|
|
<div> |
|
|
<div> |
|
|