fix autologin, add osu folder detection

This commit is contained in:
2024-01-18 16:32:57 +01:00
parent d5b2b8012c
commit 94fa7e7bd8
11 changed files with 163 additions and 17 deletions

View File

@@ -5,8 +5,10 @@
DropdownItem,
DropdownHeader,
DropdownDivider,
Button,
} from "flowbite-svelte";
import {
ArrowLeftSolid,
ArrowRightFromBracketSolid,
ArrowRightToBracketSolid,
UserSettingsSolid,
@@ -103,6 +105,17 @@
<div class="p-2 flex flex-row justify-between items-center">
<div class="flex flex-row items-center animate-fadeIn opacity-0">
{#if $currentPage == Page.Settings}
<Button
class="dark:!bg-gray-800 dark:active:!bg-gray-950 !ring-0 outline-none !border-none dark:text-white w-10 h-10 mr-1 rounded-lg animate-sideIn opacity-0"
color="none"
on:click={() => {
currentPage.set(Page.Launch);
}}
>
<ArrowLeftSolid class="outline-none border-none" size="sm" />
</Button>
{/if}
<img src={ezppLogo} alt="EZPPFarm Logo" class="w-12 h-12 mr-2" />
<span class="text-gray-700 dark:text-gray-100 text-xl font-extralight">
EZPPLauncher

View File

@@ -20,6 +20,10 @@ html .cet-titlebar .cet-control-icon svg {
display: none;
}
.cet-container {
overflow: hidden !important;
}
.indeterminate {
background-image: repeating-linear-gradient(
90deg,

View File

@@ -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();

View File

@@ -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>