feat: add osu skin retrieval functionality and integrate into loading and setup processes

This commit is contained in:
2025-07-04 10:16:51 +02:00
parent 8c5e7ca6f2
commit 41608afae2
6 changed files with 53 additions and 11 deletions

View File

@@ -6,6 +6,7 @@
import * as Select from '@/components/ui/select';
import {
beatmapSets,
currentSkin,
currentView,
launching,
osuBuild,
@@ -121,6 +122,10 @@
if (skinsCount) {
skins.set(skinsCount);
}
const skin: string = await invoke('get_osu_skin', {
folder: $osuInstallationPath,
});
currentSkin.set(skin);
}
};
@@ -266,6 +271,11 @@
});
if (skinCount) skins.set(skinCount);
const skin: string = await invoke('get_osu_skin', {
folder: $osuInstallationPath,
});
currentSkin.set(skin);
launching.set(false);
} catch (err) {
console.log(err);
@@ -706,6 +716,16 @@
{/if}
</Badge>
</span>
<span class="text-sm text-muted-foreground font-semibold">Skin</span>
<span class="text-sm font-semibold text-end text-theme-50">
<Badge>
{#if $currentSkin}
{$currentSkin}
{:else}
<LoaderCircle class="animate-spin" size={17} />
{/if}
</Badge>
</span>
</div>
</div>
{:else if selectedTab === 'settings'}

View File

@@ -4,6 +4,7 @@
import {
beatmapSets,
currentLoadingInfo,
currentSkin,
currentView,
firstStartup,
osuBuild,
@@ -136,6 +137,10 @@
folder: $osuInstallationPath,
});
if (skinCount) skins.set(skinCount);
const skin: string = await invoke('get_osu_skin', {
folder: $osuInstallationPath,
});
currentSkin.set(skin);
}
}

View File

@@ -17,7 +17,7 @@
userSettings,
} from '@/userSettings';
import Label from '@/components/ui/label/label.svelte';
import { beatmapSets, currentView, osuBuild, osuStream, skins } from '@/global';
import { beatmapSets, currentSkin, currentView, osuBuild, osuStream, skins } from '@/global';
import Launch from './Launch.svelte';
import Confetti from 'svelte-confetti';
@@ -92,6 +92,11 @@
skins.set(skinsCount);
}
const skin: string = await invoke('get_osu_skin', {
folder: $osuInstallationPath,
});
currentSkin.set(skin);
const osuReleaseStream: string = await invoke('get_osu_release_stream', {
folder: $osuInstallationPath,
});