fix: reuse account modal surface for deletion (#23)
This commit is contained in:
@@ -707,8 +707,5 @@ input:disabled, select:disabled { color: var(--color-ink-tertiary); background:
|
||||
.auth-panel h1 { font-size: var(--type-display-sm); }
|
||||
.admin-section { padding: var(--space-5); }
|
||||
}
|
||||
.session-delete-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-5); background: rgb(0 0 0 / 32%); }
|
||||
.session-delete-confirmation { width: min(420px, 100%); padding: var(--space-6); border: 1px solid var(--border); border-radius: 8px; background: var(--background); box-shadow: 0 20px 56px rgb(0 0 0 / 24%); }
|
||||
.session-delete-confirmation h2 { margin: 0 0 var(--space-3); font-size: var(--type-title-lg); }
|
||||
.session-delete-confirmation p { margin: 0; color: var(--muted-foreground); }
|
||||
.session-delete-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
|
||||
.session-delete-overlay { z-index: 100; }
|
||||
.session-delete-confirmation p { margin: 0; color: var(--color-ink-secondary); }
|
||||
|
||||
@@ -2324,11 +2324,11 @@ export default function Home() {
|
||||
onOpenLogout={() => openAccountDialog("logout")}
|
||||
/>
|
||||
{pendingSessionDeletion ? (
|
||||
<div className="session-delete-overlay" role="presentation" onMouseDown={() => setPendingSessionDeletion(null)}>
|
||||
<section className="session-delete-confirmation" role="alertdialog" aria-modal="true" aria-label="确认删除聊天记录" onMouseDown={(event) => event.stopPropagation()}>
|
||||
<div className="account-modal-overlay session-delete-overlay" role="presentation" onMouseDown={() => setPendingSessionDeletion(null)}>
|
||||
<section className="account-modal logout-modal session-delete-confirmation" role="alertdialog" aria-modal="true" aria-label="确认删除聊天记录" onMouseDown={(event) => event.stopPropagation()}>
|
||||
<h2>删除聊天记录?</h2>
|
||||
<p>“{pendingSessionDeletion.title}”将被永久删除,无法恢复。</p>
|
||||
<div className="session-delete-actions">
|
||||
<div className="dialog-actions">
|
||||
<button type="button" onClick={() => setPendingSessionDeletion(null)}>取消</button>
|
||||
<button className="danger-button" type="button" onClick={() => {
|
||||
const session = pendingSessionDeletion;
|
||||
|
||||
Reference in New Issue
Block a user