chore: add launch button states

This commit is contained in:
HorizonCode committed 2026-02-15 19:02:07 +01:00
1 parent 1aa973f6bb
commit 08a8e34781
1 file changed
+12 -3
+12 -3
View File
@@ -169,6 +169,7 @@
}; };
const launch = async () => { const launch = async () => {
if ($launching) return;
if ($trackingEnabled) umami.track('app_launch_osu'); if ($trackingEnabled) umami.track('app_launch_osu');
const osuRunning = await isOsuRunning(); const osuRunning = await isOsuRunning();
if (osuRunning) { if (osuRunning) {
@@ -955,9 +956,17 @@
: 'Launching...' : 'Launching...'
: $serverConnectionFails > 1 : $serverConnectionFails > 1
? 'No connection' ? 'No connection'
: 'Launch'} : $osuInstallationPath === ''
subtext={$launching && !cleanup ? launchInfo : undefined} ? 'Hmmm..'
disabled={$launching || $osuInstallationPath === '' || $serverConnectionFails > 1} : 'Launch'}
subtext={$launching && !cleanup
? launchInfo
: $osuInstallationPath === ''
? 'osu! path is not set!'
: $serverConnectionFails > 1
? 'No connection...'
: undefined}
disabled={$osuInstallationPath === '' || $serverConnectionFails > 1}
onClick={launch} onClick={launch}
/> />
</div> </div>