start launch function
This commit is contained in:
parent
ad2c91db4d
commit
1adb1b7dec
184
package-lock.json
generated
184
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -34,7 +34,6 @@
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/rebuild": "^3.5.0",
|
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.8",
|
||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
"better-sqlite3": "^9.2.2",
|
"better-sqlite3": "^9.2.2",
|
||||||
|
@ -43,6 +42,7 @@
|
||||||
"svelte-french-toast": "^1.2.0"
|
"svelte-french-toast": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@electron/rebuild": "^3.5.0",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-image": "^3.0.3",
|
"@rollup/plugin-image": "^3.0.3",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
|
|
|
@ -4,15 +4,20 @@
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
DropdownHeader,
|
DropdownHeader,
|
||||||
DropdownDivider,
|
DropdownDivider
|
||||||
} from "flowbite-svelte";
|
} from "flowbite-svelte";
|
||||||
import {
|
import {
|
||||||
ArrowRightFromBracketSolid,
|
ArrowRightFromBracketSolid,
|
||||||
ArrowRightToBracketSolid,
|
ArrowRightToBracketSolid,
|
||||||
UserSettingsSolid,
|
UserSettingsSolid
|
||||||
} from "flowbite-svelte-icons";
|
} from "flowbite-svelte-icons";
|
||||||
import ezppLogo from "../public/favicon.png";
|
import ezppLogo from "../public/favicon.png";
|
||||||
import { currentPage, currentUser, launching } from "./storage/localStore";
|
import {
|
||||||
|
currentPage,
|
||||||
|
currentUser,
|
||||||
|
launching,
|
||||||
|
launchStatus
|
||||||
|
} from "./storage/localStore";
|
||||||
import { Page } from "./consts/pages";
|
import { Page } from "./consts/pages";
|
||||||
import Login from "./pages/Login.svelte";
|
import Login from "./pages/Login.svelte";
|
||||||
import Launch from "./pages/Launch.svelte";
|
import Launch from "./pages/Launch.svelte";
|
||||||
|
@ -33,6 +38,11 @@
|
||||||
currentUser.set(undefined);
|
currentUser.set(undefined);
|
||||||
currentPage.set(Page.Login);
|
currentPage.set(Page.Login);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.addEventListener("launchStatusUpdate", (e) => {
|
||||||
|
const status = (e as CustomEvent).detail;
|
||||||
|
launchStatus.set(status);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Toaster></Toaster>
|
<Toaster></Toaster>
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
<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";
|
import { launching, patch, launchStatus } from "./../storage/localStore";
|
||||||
let progressbarFix = true;
|
let progressbarFix = true;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
progressbarFix = false;
|
progressbarFix = false;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
const launch = () => {
|
||||||
|
launching.set(true);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
|
@ -41,7 +45,7 @@
|
||||||
size="h-3"
|
size="h-3"
|
||||||
labelInsideClass="bg-primary-600 drop-shadow-xl text-gray-100 text-base font-medium text-center p-1 leading-none rounded-full"
|
labelInsideClass="bg-primary-600 drop-shadow-xl text-gray-100 text-base font-medium text-center p-1 leading-none rounded-full"
|
||||||
/>
|
/>
|
||||||
<p class="m-0 p-0 dark:text-gray-400 font-light">Waiting...</p>
|
<p class="m-0 p-0 dark:text-gray-400 font-light">{$launchStatus}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -4,6 +4,9 @@ import type { User } from "../types/user";
|
||||||
|
|
||||||
export const startup = writable(false);
|
export const startup = writable(false);
|
||||||
export const launching = writable(false);
|
export const launching = writable(false);
|
||||||
|
export const launchStatus = writable("Waiting...");
|
||||||
|
export const launchPercentage = writable(-1);
|
||||||
|
export const osuPath: Writable<undefined | string> = writable(undefined);
|
||||||
export const patch = writable(true);
|
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