What changed:
- Onboarding tracking: admin_app_opened on first authenticated dashboard load; event_created, branding_configured,
and invite_created on their respective actions.
- Tour replay: Settings now has an “Experience” section to replay the tour (clears tour seen flag and opens via ?tour=1).
- Empty states: Tasks, Members, and Guest Messages now include richer copy + quick actions.
- New helpers + copy: Tour storage helpers, new translations, and related UI wiring.
40 lines
833 B
TypeScript
40 lines
833 B
TypeScript
export type TourStepKey = 'event' | 'qr' | 'photos' | 'push';
|
|
|
|
export const TOUR_STORAGE_KEY = 'admin-mobile-tour-v1';
|
|
|
|
export function resolveTourStepKeys(hasEvents: boolean): TourStepKey[] {
|
|
if (hasEvents) {
|
|
return ['qr', 'photos', 'push'];
|
|
}
|
|
|
|
return ['event', 'qr', 'photos', 'push'];
|
|
}
|
|
|
|
export function getTourSeen(): boolean {
|
|
if (typeof window === 'undefined') {
|
|
return false;
|
|
}
|
|
|
|
try {
|
|
return window.localStorage.getItem(TOUR_STORAGE_KEY) === 'seen';
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
export function setTourSeen(seen: boolean): void {
|
|
if (typeof window === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
try {
|
|
if (seen) {
|
|
window.localStorage.setItem(TOUR_STORAGE_KEY, 'seen');
|
|
} else {
|
|
window.localStorage.removeItem(TOUR_STORAGE_KEY);
|
|
}
|
|
} catch {
|
|
// Ignore storage errors.
|
|
}
|
|
}
|