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:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import '../app.css';
|
||||
import Titlebar from '@/components/ui/titlebar/titlebar.svelte';
|
||||
import { first_startup, setupValues } from '@/global';
|
||||
import { currentLoadingInfo, firstStartup, setupValues } from '@/global';
|
||||
import { onMount } from 'svelte';
|
||||
import OsuCursor from '@/components/ui/osu-cursor/OsuCursor.svelte';
|
||||
import {
|
||||
@@ -68,9 +68,10 @@
|
||||
window.Buffer = Buffer;
|
||||
disableReload();
|
||||
setupValues();
|
||||
const firstStartup = await $userSettings.init();
|
||||
const isFirstStartup = await $userSettings.init();
|
||||
$userAuth.init();
|
||||
|
||||
currentLoadingInfo.set('Loading config...');
|
||||
const config_custom_cursor = $userSettings.value('custom_cursor');
|
||||
const config_cursor_smoothening = $userSettings.value('cursor_smoothening');
|
||||
const config_reduce_animations = $userSettings.value('reduce_animations');
|
||||
@@ -85,7 +86,7 @@
|
||||
cursorSmoothening.subscribe((val) => config_cursor_smoothening.set(val));
|
||||
reduceAnimations.subscribe((val) => config_reduce_animations.set(val));
|
||||
|
||||
first_startup.set(firstStartup);
|
||||
firstStartup.set(isFirstStartup);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user