This commit is contained in:
2025-07-14 19:39:41 +02:00
11 changed files with 132 additions and 26 deletions

View File

@@ -150,6 +150,12 @@
@layer base {
* {
@apply border-border outline-ring/50;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
body {
@apply bg-background text-foreground;

View File

@@ -6,6 +6,8 @@ import type { Release } from './types';
export const currentView = writable<Component>(Loading);
export const platform = writable<string>("");
export const launcherVersion = writable<string>('');
export const newVersion = writable<Release | undefined>(undefined);

View File

@@ -133,3 +133,7 @@ export const exit = async () => await invoke('exit');
export const getPlatform = async () => await invoke<string>('get_platform');
export const isOsuCorrupted = async (folder: string) =>
await invoke<boolean>('check_for_corruption', { folder });
export const hasWMCTRL = async () =>
await invoke<boolean>('has_wmctrl');
export const hasOsuWinello = async () =>
await invoke<boolean>('has_osuwinello');

View File

@@ -16,6 +16,7 @@
newVersion,
osuBuild,
osuStream,
platform,
presenceLoading,
serverConnectionFails,
serverPing,
@@ -89,6 +90,8 @@
getSkin,
getSkinsCount,
getVersion,
hasOsuWinello,
hasWMCTRL,
isOsuCorrupted,
isOsuRunning,
isValidOsuFolder,
@@ -186,6 +189,23 @@
return;
}
if($platform === "linux"){
if(!(await hasWMCTRL())){
toast.error('Hmmm...', {
description: 'wmctrl seems to be missing, please install via AUR.',
});
launching.set(false);
return;
}
if(!(await hasOsuWinello())){
toast.error('Hmmm...', {
description: 'osu-winello seems to be missing, please install it.',
});
launching.set(false);
return;
}
}
try {
launchInfo = 'Looking for EZPPLauncher File updates...';
const updateResult = await getEZPPLauncherUpdateFiles(osuPath, $launcherStream);
@@ -804,7 +824,7 @@
</div>
<div class="flex flex-col gap-6 w-full h-full bg-theme-900/40 p-6">
<div
class="flex flex-row flex-nowrap h-11 w-full bg-theme-800/50 border border-theme-800/90 rounded-lg p-[4px]"
class="flex flex-row flex-nowrap h-11 gap-1 w-full bg-theme-800/50 border border-theme-800/90 rounded-lg p-[4px]"
>
<button
class="w-full flex justify-center items-center font-semibold text-sm rounded-lg {selectedTab ===
@@ -1030,11 +1050,12 @@
>
<div class="flex flex-col">
<Label class="text-sm" for="setting-custom-cursor">Patching</Label>
<div class="text-muted-foreground text-xs">Shows misses in Relax and Autopilot</div>
<div class="text-muted-foreground text-xs">Shows misses in Relax and Autopilot {#if $platform !== "windows"}<span class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg">currently only on windows!</span> {/if}</div>
</div>
<Checkbox
id="setting-custom-cursor"
checked={$patch}
checked={$platform === "windows" ? $patch : false}
disabled={$platform !== "windows"}
onCheckedChange={async (e) => {
patch.set(e);
$userSettings.save();

View File

@@ -9,6 +9,7 @@
discordPresence,
firstStartup,
launcherVersion,
platform,
presenceLoading,
setupValues,
} from '@/global';
@@ -90,7 +91,8 @@
disableReload();
setupValues();
launcherVersion.set(await getLauncherVersion());
if ((await getPlatform()) !== 'windows') unsupported_platform = true;
platform.set(await getPlatform());
if ($platform !== "windows" && $platform !== "linux") unsupported_platform = true;
const isFirstStartup = await $userSettings.init();
$userAuth.init();