refactor(ui): replace modal dialogs with toast/sheet components
Remove DialogVant/NotifyVant and add Toast and Sheet components with useToast, useReveal, and usePageTransition composables. Rework Navigation, RegisterView, and styles across both apps; rebuild dist assets. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
148b99c4a6
commit
c05352d6fd
@@ -3,6 +3,7 @@ import { useSessionStore } from '../stores/session';
|
||||
import { useNavStore } from '../stores/navStore';
|
||||
import { useTransitionStore } from '../stores/transitionStore';
|
||||
import { api } from '../api/client';
|
||||
import { afterPageLeave } from '../composables/usePageTransition';
|
||||
|
||||
// Legacy lazy-loaded every route component (`component: () => import(...)`) so
|
||||
// the initial bundle only carries the entry route. Matched here.
|
||||
@@ -10,7 +11,11 @@ export const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
// Ported from legacy router/index.ts:225-237 — restore saved scroll on
|
||||
// back/forward, otherwise jump to top on every navigation.
|
||||
scrollBehavior(_to, _from, savedPosition) {
|
||||
// Waits for MasterLayout's outgoing page to finish fading first, so the
|
||||
// scroll happens behind the still-transparent incoming page instead of
|
||||
// jerking the old one to the top mid-fade (see composables/usePageTransition.ts).
|
||||
async scrollBehavior(_to, _from, savedPosition) {
|
||||
await afterPageLeave();
|
||||
if (savedPosition) return savedPosition;
|
||||
return { top: 0 };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user