Refine local backup modal and permission flow
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s

This commit is contained in:
Shinuwa 2026-09-25 11:35:31 +02:00
parent ee823d2c37
commit 69e3b8ef2f
4 changed files with 19 additions and 12 deletions

View file

@ -1,5 +1,6 @@
// Rôle : fournit les modales globales liées aux toolboxes et confirmations.
import { useEffect, useState } from "react";
import { flushSync } from "react-dom";
import { Icon } from "./Icon.jsx";
import { lockBodyScroll } from "../utils/bodyScrollLock.js";
@ -35,8 +36,8 @@ export function NotificationToast({ id, message, durationMs = 120000, actionLabe
<div className={`notification-toast nds-toast${actionLabel && onAction ? " has-action" : ""}`} role="status">
<span>{message}</span>
{actionLabel && onAction && <button className="nds-button notification-toast-action" data-size="xs" data-variant="primary" type="button" onClick={() => {
flushSync(() => onClose(id));
onAction();
onClose(id);
}}>{actionLabel}</button>}
<button className="nds-icon-button" data-size="xs" type="button" onClick={() => onClose(id)} aria-label="Fermer l'alerte" title="Fermer">
<Icon name="close" />
@ -95,7 +96,7 @@ export function AutoBackupModal({ backup, content, onClose }) {
return (
<div className="confirm-modal-root auto-backup-modal-root">
<div className="confirm-backdrop nds-modal-backdrop" onClick={onClose} />
<section className="confirm-modal nds-modal auto-backup-modal" role="dialog" aria-modal="true" aria-labelledby="auto-backup-title">
<section className="confirm-modal nds-modal auto-backup-modal themed-scrollbar" role="dialog" aria-modal="true" aria-labelledby="auto-backup-title">
<header className="auto-backup-modal-header">
<div>
<p className="eyebrow">{content.eyebrow}</p>

View file

@ -31,8 +31,8 @@
margin-bottom: var(--space-6);
}
.auto-backup-modal {
width: min(620px, calc(100vw - 32px));
.auto-backup-modal.nds-modal {
width: min(760px, calc(100vw - 32px));
max-height: min(760px, calc(100vh - 32px));
overflow-y: auto;
}