-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFirstTimeSetup.svelte
More file actions
42 lines (33 loc) · 1.12 KB
/
FirstTimeSetup.svelte
File metadata and controls
42 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script lang="ts">
import StateRenderer from "$lib/StateRenderer.svelte";
import { StartCoreProcesses } from "$ts/process/startup";
import { ArcSoundBus } from "$ts/soundbus";
import { StateHandler } from "$ts/states";
import { ProcessStack } from "$ts/stores/process";
import { UserDataStore, UserName, defaultUserData } from "$ts/stores/user";
import { sleep } from "$ts/util";
import { onMount } from "svelte";
import Progress from "./Components/Progress.svelte";
import "./css/fts.css";
import { firstTimeSetupStates } from "./ts/store/state";
let handler: StateHandler;
let show = false;
onMount(async () => {
UserName.set("");
UserDataStore.set(defaultUserData);
ArcSoundBus.playSound("arcos.system.logon");
ProcessStack.processes.set(new Map([]));
await StartCoreProcesses();
handler = new StateHandler("fts", firstTimeSetupStates, "welcome");
await sleep(1000);
show = true;
});
</script>
{#if handler}
<div class="fts-content fullscreen" class:show>
<div class="content">
<StateRenderer {handler} />
</div>
<Progress {handler} />
</div>
{/if}