fix: reuse account modal surface for deletion (#23)

This commit is contained in:
732642856
2026-07-21 14:19:42 +08:00
committed by GitHub
parent 5b8804d65d
commit fcf5794513
2 changed files with 5 additions and 8 deletions
+2 -5
View File
@@ -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); }
+3 -3
View File
@@ -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;