feat: add osu skin retrieval functionality and integrate into loading and setup processes
This commit is contained in:
@@ -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'}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
});
|
||||
|
Reference in New Issue
Block a user