- Phase 3 PW-Reset: 3 screens (forgot-password → reset-otp → new-password),
verifyOtp({type:'recovery'}), new updatePassword() action
- Custom Brevo-Mail templates (backend/public/templates/) — 5 HTMLs with
go-template i18n (de/en/fr/ar incl. RTL for AR), OTP-only (no link),
ReBreak branding
- signUp metadata.data.locale aus i18n.language → templates resolven Sprache
- Account-Switch-Bug fix: signOut() resettet alle 10 user-spezifischen stores
+ invalidateMe()
26 lines
671 B
TypeScript
26 lines
671 B
TypeScript
import { create } from 'zustand';
|
|
|
|
export type PendingConsentConnection = {
|
|
id: string;
|
|
email: string;
|
|
};
|
|
|
|
type MailConsentState = {
|
|
visible: boolean;
|
|
connections: PendingConsentConnection[];
|
|
show: (connections: PendingConsentConnection[]) => void;
|
|
hide: () => void;
|
|
markConsented: () => void;
|
|
reset: () => void;
|
|
};
|
|
|
|
export const useMailConsentStore = create<MailConsentState>((set) => ({
|
|
visible: false,
|
|
connections: [],
|
|
|
|
show: (connections) => set({ visible: true, connections }),
|
|
hide: () => set({ visible: false }),
|
|
markConsented: () => set({ visible: false, connections: [] }),
|
|
reset: () => set({ visible: false, connections: [] }),
|
|
}));
|