diff --git a/src/front/Components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx b/src/front/Components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx index 834009ad..f0f61287 100644 --- a/src/front/Components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx +++ b/src/front/Components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx @@ -38,6 +38,7 @@ class ToastElementClass extends React.Component { } public override render(): JSX.Element { + console.log(this.props); const toast = this.props.toast; const style = { "--data-duration": `${toast.time}ms`, @@ -98,7 +99,8 @@ class ToastElementClass extends React.Component { this.close(); } - private close() { + private async close() { + await Toasts.getInstance().markRead(this.props.toast); window.clearTimeout(this.closeTimeout); this.setState({ willClose: true, @@ -110,7 +112,7 @@ class ToastElementClass extends React.Component { private async handleClick(e: React.MouseEvent) { if (this.props.toast.redirectUrl) { - this.onClose(e); + await this.onClose(e); await this.props.router.push(this.props.toast.redirectUrl); this.props.router.reload(); } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/classes.module.scss b/src/front/Components/Layouts/Folder/FolderInformation/classes.module.scss index f84b215e..a274d91e 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/classes.module.scss +++ b/src/front/Components/Layouts/Folder/FolderInformation/classes.module.scss @@ -107,7 +107,7 @@ justify-content: center; height: 100%; .loader { - width: 40px; - height: 40px; + width: 21px; + height: 21px; } } diff --git a/src/front/Components/Layouts/LoginCustomer/StepTotp/classes.module.scss b/src/front/Components/Layouts/LoginCustomer/StepTotp/classes.module.scss index fae541af..fabaa162 100644 --- a/src/front/Components/Layouts/LoginCustomer/StepTotp/classes.module.scss +++ b/src/front/Components/Layouts/LoginCustomer/StepTotp/classes.module.scss @@ -4,8 +4,7 @@ display: flex; flex-direction: column; max-width: 530px; - margin: auto; - margin-top: 220px; + margin: 220px auto; .title { text-align: left; diff --git a/src/front/Stores/Toasts.tsx b/src/front/Stores/Toasts.tsx index 3cb81152..eafe0cb3 100644 --- a/src/front/Stores/Toasts.tsx +++ b/src/front/Stores/Toasts.tsx @@ -85,15 +85,18 @@ export default class Toasts { return () => this.close(toast); } + public markRead(toast: IToast) { + if (!toast.uid) return; + Notifications.getInstance().put(toast.uid, { + read: true, + }); + } + public close(toast: IToast) { const index = this.toastList.indexOf(toast); if (index === -1) return; this.toastList.splice(index, 1); - if (toast.uid) - Notifications.getInstance().put(toast.uid, { - read: true, - }); this.event.emit("change", this.toastList); }