feat: add scoped upload tokens

This commit is contained in:
Ludwig Lehnert
2026-06-18 19:17:51 +00:00
parent a2b6054440
commit 0ed32f7623
17 changed files with 592 additions and 95 deletions

View File

@@ -0,0 +1,36 @@
'use client';
import { useRef } from 'react';
export function ActionDialog({ label = 'Aktionen', title = 'Aktionen', children }) {
const dialogRef = useRef(null);
function openDialog() {
dialogRef.current?.showModal();
}
function closeOnBackdrop(event) {
if (event.target === event.currentTarget) {
event.currentTarget.close();
}
}
return (
<>
<button className="btn secondary" type="button" onClick={openDialog}>
{label}
</button>
<dialog className="action-dialog" ref={dialogRef} onClick={closeOnBackdrop}>
<div className="dialog-header">
<h3>{title}</h3>
<form method="dialog">
<button className="btn secondary" type="submit">
Schließen
</button>
</form>
</div>
<div className="action-dialog-body">{children}</div>
</dialog>
</>
);
}