diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 8872da5..83e3362 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -8,15 +8,14 @@ const tasksPromise: Promise = loadTasks(); - let selectedTask: string | null = null - let finalSelect: boolean = false + let selectedTask: string | null = null; + let finalSelect: boolean = false; function clickTask(e: CustomEvent) { - finalSelect = true + finalSelect = true; } const hash = window.location.hash.substr(1); -
- {#if hash == "editor"} - - - - {:else} - - - - - {/if} + {#if hash == 'editor'} + + + + {:else} + + +
+ +
+
+ {/if}
diff --git a/frontend/src/Editor.svelte b/frontend/src/Editor.svelte index 0502bd6..c222e3b 100644 --- a/frontend/src/Editor.svelte +++ b/frontend/src/Editor.svelte @@ -2,7 +2,7 @@ import Graph from "./Graph.svelte"; import { grabAssignment } from "./ksp-task-grabber"; import type { TaskDescriptor, TasksFile } from "./task-loader"; - import { createTaskMap, getCategories } from "./task-loader"; + import { saveTasks, createTaskMap, getCategories } from "./task-loader"; export let tasks: TasksFile; @@ -59,6 +59,10 @@ function toggleDivnaPromena() { hovnoDivnaPromenaKteraJeFaktFuj = !hovnoDivnaPromenaKteraJeFaktFuj; } + + async function saveCurrentState() { + await saveTasks(tasks); + }