feat: Refactor API interactions and enhance user settings management

- Updated ezpp API to include user info retrieval and improved error handling.
- Introduced new writable stores for current user info and loading states.
- Added gamemode enums and utility functions for better gamemode handling.
- Refactored global state management to use consistent naming conventions.
- Enhanced loading and login components to provide better user feedback.
- Updated user settings to include preferred mode and type.
- Improved layout and page components for better state management and user experience.
This commit is contained in:
2025-07-03 11:46:50 +02:00
parent 892f2cea07
commit 651592c333
13 changed files with 680 additions and 128 deletions

View File

@@ -11,7 +11,7 @@
import Checkbox from '@/components/ui/checkbox/checkbox.svelte';
import { cursorSmoothening, customCursor, reduceAnimations, userSettings } from '@/userSettings';
import Label from '@/components/ui/label/label.svelte';
import { current_view } from '@/global';
import { beatmapSets, currentView } from '@/global';
import Launch from './Launch.svelte';
import Confetti from 'svelte-confetti';
@@ -65,6 +65,13 @@
autoDetectedOsuPath = false;
manualSelectValid = true;
$userSettings.value('osu_installation_path').set(osuInstallationPath);
const beatmapSetCount: number | null = await invoke('get_beatmapsets_count', {
folder: osuInstallationPath,
});
if (beatmapSetCount) {
beatmapSets.set(beatmapSetCount);
}
}
};
@@ -90,7 +97,7 @@
class="mt-4"
onclick={async () => {
await $userSettings.save();
current_view.set(Launch);
currentView.set(Launch);
}}
>
Finish