All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
Core logic portable (economy, balance, cosmetics, migrateSave) — zero rewrite. 136 tests green, identiques. Backend inchangé. - Svelte 5 runes stores (game, auth, toast) remplacent Zustand - SvelteKit adapter-static SPA (dist/ output, fallback index.html) - Tailwind v4 conservé, design system .gp-* porté - Transitions natives : slide, fly, scale, fade sur toute l'UI - Sidebar tabbée (Production/Evolution/Collection) + CollapsiblePanel - Mobile bottom sheet avec FAB toggle + backdrop blur - Click particles réactifs Svelte (plus de DOM impératif) - TadpoleSprite bounce + glow ring au clic - Guide refait en accordéon, Achievements avec filtres - a11y : focus-visible, Escape modals, aria-current, aria-labels - CI/CD adapté (tests + build + rsync) - Build 504K (vs ~1.2MB React)
29 lines
605 B
Svelte
29 lines
605 B
Svelte
<script lang="ts">
|
|
import { onMount } from 'svelte';
|
|
import { authStore } from '$lib/stores/auth.svelte';
|
|
import { gameStore } from '$lib/stores/game.svelte';
|
|
import {
|
|
loadFromServer,
|
|
startAutoSave,
|
|
stopAutoSave,
|
|
setupVisibilitySync,
|
|
} from '$lib/save-sync';
|
|
|
|
onMount(async () => {
|
|
// Init auth
|
|
await authStore.init();
|
|
|
|
// Load save or init guest
|
|
if (authStore.user) {
|
|
const loaded = await loadFromServer();
|
|
if (!loaded && !gameStore.ready) {
|
|
gameStore.initGuest();
|
|
}
|
|
startAutoSave();
|
|
setupVisibilitySync();
|
|
} else {
|
|
gameStore.initGuest();
|
|
}
|
|
});
|
|
</script>
|