fix autologin, add osu folder detection
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
const resultData = customEvent.detail;
|
||||
const isGuest = "guest" in resultData;
|
||||
const wasSuccessful = "user" in resultData;
|
||||
console.log(resultData);
|
||||
if (isGuest) {
|
||||
currentPage.set(Page.Launch);
|
||||
res();
|
||||
|
@@ -1,6 +1,13 @@
|
||||
<script lang="ts">
|
||||
import { Button, ButtonGroup, Input, Toggle } from "flowbite-svelte";
|
||||
import { FolderSolid } from "flowbite-svelte-icons";
|
||||
import {
|
||||
Button,
|
||||
ButtonGroup,
|
||||
Input,
|
||||
Label,
|
||||
Toggle,
|
||||
Tooltip,
|
||||
} from "flowbite-svelte";
|
||||
import { FileSearchSolid, FolderSolid } from "flowbite-svelte-icons";
|
||||
import { currentPage } from "../storage/localStore";
|
||||
import { Page } from "../consts/pages";
|
||||
|
||||
@@ -20,6 +27,10 @@
|
||||
window.dispatchEvent(new CustomEvent("folder-set"));
|
||||
};
|
||||
|
||||
const detectFolderPath = () => {
|
||||
window.dispatchEvent(new CustomEvent("folder-auto"));
|
||||
};
|
||||
|
||||
const togglePatching = () => {
|
||||
patching = !patching;
|
||||
};
|
||||
@@ -46,6 +57,7 @@
|
||||
<ButtonGroup class="w-full">
|
||||
<Input
|
||||
type="text"
|
||||
id="oip"
|
||||
placeholder="Path to your osu! installation"
|
||||
value={folderPath}
|
||||
readonly
|
||||
@@ -53,19 +65,23 @@
|
||||
<Button
|
||||
color="light"
|
||||
class="dark:active:!bg-gray-900"
|
||||
on:click={setFolderPath}
|
||||
><FolderSolid
|
||||
on:click={detectFolderPath}
|
||||
>
|
||||
<FileSearchSolid
|
||||
size="sm"
|
||||
class="dark:text-gray-300 text-gray-500 outline-none border-none select-none pointer-events-none"
|
||||
/></Button
|
||||
>
|
||||
</ButtonGroup>
|
||||
<div class="flex flex-row justify-center items-center gap-5">
|
||||
/>
|
||||
</Button>
|
||||
<Button
|
||||
color="light"
|
||||
class="dark:active:!bg-gray-900"
|
||||
on:click={() => currentPage.set(Page.Launch)}>Go Back</Button
|
||||
class="dark:active:!bg-gray-900 active:!rounded-lg"
|
||||
on:click={setFolderPath}
|
||||
>
|
||||
</div>
|
||||
<FolderSolid
|
||||
size="sm"
|
||||
class="dark:text-gray-300 text-gray-500 outline-none border-none select-none pointer-events-none"
|
||||
/>
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</main>
|
||||
|
Reference in New Issue
Block a user