change launch/patch to storage property
This commit is contained in:
parent
dfa933fb87
commit
3588203527
|
@ -1,9 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button, Checkbox } from "flowbite-svelte";
|
import { Button, Checkbox } from "flowbite-svelte";
|
||||||
import Progressbar from "../lib/Progressbar.svelte";
|
import Progressbar from "../lib/Progressbar.svelte";
|
||||||
|
import { launching, patch } from "./../storage/localStore";
|
||||||
let progressbarFix = true;
|
let progressbarFix = true;
|
||||||
let launching = false;
|
|
||||||
let patch = true;
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
progressbarFix = false;
|
progressbarFix = false;
|
||||||
|
@ -19,15 +18,19 @@
|
||||||
<Button
|
<Button
|
||||||
color="light"
|
color="light"
|
||||||
size="xl"
|
size="xl"
|
||||||
class="dark:active:!bg-gray-900 {launching
|
class="dark:active:!bg-gray-900 {$launching
|
||||||
? ''
|
? ''
|
||||||
: 'active:scale-95 '}transition-transform duration-75"
|
: 'active:scale-95 '}transition-transform duration-75"
|
||||||
disabled={launching}
|
disabled={$launching}
|
||||||
on:click={() => (launching = !launching)}>Launch</Button
|
on:click={() => launching.set(!$launching)}>Launch</Button
|
||||||
|
>
|
||||||
|
<Checkbox
|
||||||
|
disabled={$launching}
|
||||||
|
bind:checked={$patch}
|
||||||
|
on:click={() => patch.set(!$patch)}>Patch</Checkbox
|
||||||
>
|
>
|
||||||
<Checkbox disabled={launching} bind:checked={patch}>Patch</Checkbox>
|
|
||||||
<div
|
<div
|
||||||
class="w-full flex flex-col justify-center items-center gap-2 mt-2 {launching
|
class="w-full flex flex-col justify-center items-center gap-2 mt-2 {$launching
|
||||||
? 'animate-fadeIn '
|
? 'animate-fadeIn '
|
||||||
: 'animate-fadeOut '}{progressbarFix ? '!opacity-0' : 'opacity-0'}"
|
: 'animate-fadeOut '}{progressbarFix ? '!opacity-0' : 'opacity-0'}"
|
||||||
>
|
>
|
||||||
|
|
|
@ -3,5 +3,7 @@ import { Page } from "../consts/pages";
|
||||||
import type { User } from "../types/user";
|
import type { User } from "../types/user";
|
||||||
|
|
||||||
export const startup = writable(false);
|
export const startup = writable(false);
|
||||||
|
export const launching = writable(false);
|
||||||
|
export const patch = writable(true);
|
||||||
export const currentUser: Writable<undefined | User> = writable(undefined);
|
export const currentUser: Writable<undefined | User> = writable(undefined);
|
||||||
export const currentPage = writable(Page.Login);
|
export const currentPage = writable(Page.Login);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user