This commit is contained in:
DrSmoothl committed 2026-10-12 15:43:34 +08:00
1 parent effeb66554
commit 7c0519f75f
977 files changed
+198426 -158324

No files matched your search

+13 -16
View File
@@ -1,31 +1,28 @@
export interface OnboardingActionResult {
success: boolean;
message?: string;
success: boolean;
message?: string;
}
export interface OnboardingActions {
acceptAgreements: () => Promise<OnboardingActionResult>;
changePassword: (
oldPassword: string,
newPassword: string,
) => Promise<OnboardingActionResult>;
acceptAgreements: () => Promise<OnboardingActionResult>;
changePassword: (oldPassword: string, newPassword: string) => Promise<OnboardingActionResult>;
}
export interface OnboardingExecution {
passwordMode: 'change' | 'rehearsal';
actions: OnboardingActions;
passwordMode: 'change' | 'rehearsal';
actions: OnboardingActions;
}
const REHEARSAL_ACTIONS: OnboardingActions = {
acceptAgreements: async () => ({ success: true }),
changePassword: async () => ({ success: true }),
acceptAgreements: async () => ({ success: true }),
changePassword: async () => ({ success: true }),
};
export function onboardingExecution(
replaying: boolean,
liveActions: OnboardingActions,
replaying: boolean,
liveActions: OnboardingActions,
): OnboardingExecution {
return replaying
? { passwordMode: 'rehearsal', actions: REHEARSAL_ACTIONS }
: { passwordMode: 'change', actions: liveActions };
return replaying
? { passwordMode: 'rehearsal', actions: REHEARSAL_ACTIONS }
: { passwordMode: 'change', actions: liveActions };
}