chore: ignore esc key for update and launch dialog

This commit is contained in:
2025-07-16 22:35:39 +02:00
parent 13b90092b7
commit ec25d5d2bb
9 changed files with 37 additions and 22 deletions

View File

@@ -7,3 +7,6 @@ bun.lockb
# Miscellaneous # Miscellaneous
/static/ /static/
# Tauri
/src-tauri/

View File

@@ -9,7 +9,7 @@
"tabWidth": 2, "tabWidth": 2,
"useTabs": false, "useTabs": false,
"bracketSpacing": true, "bracketSpacing": true,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-rust"], "plugins": ["prettier-plugin-svelte"],
"overrides": [ "overrides": [
{ {
"files": "*.svelte", "files": "*.svelte",

View File

@@ -1,7 +1,7 @@
{ {
"svelte.enable-ts-plugin": true, "svelte.enable-ts-plugin": true,
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
"[rust]":{ "[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer" "editor.defaultFormatter": "rust-lang.rust-analyzer"
} }
} }

View File

@@ -28,7 +28,7 @@ It enhances the osu! experience with quality-of-life features and integration sp
## 💻 Supported Platforms ## 💻 Supported Platforms
| Platform | Status | | Platform | Status |
| -------- | ---------------- | | -------- | ---------------------------------------- |
| Windows | ✅ Supported | | Windows | ✅ Supported |
| macOS | ❌ Not supported | | macOS | ❌ Not supported |
| Linux | 🕧 Partially supported (via osu-winello) | | Linux | 🕧 Partially supported (via osu-winello) |

View File

@@ -20,10 +20,14 @@
</script> </script>
<div data-tauri-drag-region class="titlebar z-[60] border-b border-theme-800/90"> <div data-tauri-drag-region class="titlebar z-[60] border-b border-theme-800/90">
<div class="mr-auto ms-2 flex flex-row gap-2 items-center text-[1.05rem] font-semibold pointer-events-none"> <div
class="mr-auto ms-2 flex flex-row gap-2 items-center text-[1.05rem] font-semibold pointer-events-none"
>
<img src={Logo} alt="EZPP Launcher Logo" class="h-11 w-11 inline-block" /> <img src={Logo} alt="EZPP Launcher Logo" class="h-11 w-11 inline-block" />
<span>EZPPLauncher</span> <span>EZPPLauncher</span>
<Badge class="!text-[0.6rem] py-[0.5px] bg-primary-500 hover:bg-primary-500">{$launcherVersion}</Badge> <Badge class="!text-[0.6rem] py-[0.5px] bg-primary-500 hover:bg-primary-500"
>{$launcherVersion}</Badge
>
</div> </div>
<div class="titlebar-button rounded-lg transition-colors duration-75" id="titlebar-minimize"> <div class="titlebar-button rounded-lg transition-colors duration-75" id="titlebar-minimize">
<Minimize size={18} /> <Minimize size={18} />

View File

@@ -1,12 +1,12 @@
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
import { ezppfarm } from './api/ezpp'; import { ezppfarm } from './api/ezpp';
import type { Component } from 'svelte'; import type { Component } from 'svelte';
import Loading from '../pages/Loading.svelte'; import Loading from '../screens/Loading.svelte';
import type { Release } from './types'; import type { Release } from './types';
export const currentView = writable<Component>(Loading); export const currentView = writable<Component>(Loading);
export const platform = writable<string>(""); export const platform = writable<string>('');
export const launcherVersion = writable<string>(''); export const launcherVersion = writable<string>('');
export const newVersion = writable<Release | undefined>(undefined); export const newVersion = writable<Release | undefined>(undefined);

View File

@@ -133,11 +133,8 @@ export const exit = async () => await invoke('exit');
export const getPlatform = async () => await invoke<string>('get_platform'); export const getPlatform = async () => await invoke<string>('get_platform');
export const isOsuCorrupted = async (folder: string) => export const isOsuCorrupted = async (folder: string) =>
await invoke<boolean>('check_for_corruption', { folder }); await invoke<boolean>('check_for_corruption', { folder });
export const hasWMCTRL = async () => export const hasWMCTRL = async () => await invoke<boolean>('has_wmctrl');
await invoke<boolean>('has_wmctrl'); export const hasOsuWinello = async () => await invoke<boolean>('has_osuwinello');
export const hasOsuWinello = async () => export const hasNet8 = async () => await invoke<boolean>('has_net8');
await invoke<boolean>('has_osuwinello');
export const hasNet8 = async () =>
await invoke<boolean>('has_net8');
export const encryptString = async (str: string, entropy: string) => export const encryptString = async (str: string, entropy: string) =>
await invoke<string>('encrypt_string', {string: str, entropy}); await invoke<string>('encrypt_string', { string: str, entropy });

View File

@@ -92,7 +92,7 @@
setupValues(); setupValues();
launcherVersion.set(await getLauncherVersion()); launcherVersion.set(await getLauncherVersion());
platform.set(await getPlatform()); platform.set(await getPlatform());
if ($platform !== "windows" && $platform !== "linux") unsupported_platform = true; if ($platform !== 'windows' && $platform !== 'linux') unsupported_platform = true;
const isFirstStartup = await $userSettings.init(); const isFirstStartup = await $userSettings.init();
$userAuth.init(); $userAuth.init();

View File

@@ -297,7 +297,10 @@
}, },
{ {
key: 'Password', key: 'Password',
value: $platform === "windows" ? await encryptString(password, "cu24180ncjeiu0ci1nwui") : password, value:
$platform === 'windows'
? await encryptString(password, 'cu24180ncjeiu0ci1nwui')
: password,
}, },
{ {
key: 'SaveUsername', key: 'SaveUsername',
@@ -531,8 +534,12 @@
</AlertDialog.Content> </AlertDialog.Content>
</AlertDialog.Root> </AlertDialog.Root>
<AlertDialog.Root open={$newVersion !== undefined}> <AlertDialog.Root open>
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0"> <AlertDialog.Content
class="bg-theme-950 border-theme-800 p-0"
escapeKeydownBehavior="ignore"
interactOutsideBehavior="ignore"
>
<div <div
class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3" class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3"
> >
@@ -568,7 +575,11 @@
</AlertDialog.Root> </AlertDialog.Root>
<AlertDialog.Root bind:open={$launching}> <AlertDialog.Root bind:open={$launching}>
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0"> <AlertDialog.Content
class="bg-theme-950 border-theme-800 p-0"
escapeKeydownBehavior="ignore"
interactOutsideBehavior="ignore"
>
<div <div
class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3" class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3"
> >