Dateien nach "frontend/src/tools" hochladen

This commit is contained in:
2026-05-26 01:12:40 +02:00
parent 9bf8415a43
commit 0c0ee34ede
2 changed files with 32 additions and 29 deletions

View File

@@ -1,3 +1,4 @@
import { useConfirm } from '../confirm.jsx';
import { useState, useMemo, useEffect, useRef } from 'react';
import { api, S } from '../lib.js';
@@ -289,6 +290,7 @@ export default function Kalkulator3D({ toast, editData, onEditDone, mobile }) {
// ── Archiv ──────────────────────────────────────────────────────────────
export function SavedList({ toast, mobile }) {
const { confirm, ConfirmDialog } = useConfirm();
const [items, setItems] = useState([]);
const [loading, setLoading] = useState(true);
const [delId, setDelId] = useState(null);
@@ -407,18 +409,10 @@ export function SavedList({ toast, mobile }) {
</div>
{/* Aktionen */}
{delId === item.id ? (
<div style={{ display:'flex', gap:6, alignItems:'center', marginTop:8 }}>
<span style={{ color:'rgba(255,255,255,0.35)', fontSize:11, fontFamily:'monospace', flex:1 }}>Wirklich löschen?</span>
<button onClick={() => del(item.id)} style={S.btn('#ff6b9d', true)}> Ja</button>
<button onClick={() => setDelId(null)} style={S.btn('rgba(255,255,255,0.4)', true)}>Nein</button>
</div>
) : (
<div style={{ display:'flex', gap:6, marginTop:10 }}>
<button onClick={() => setEditData(item)} style={{ ...S.btn('#4ecdc4', true), flex:1, textAlign:'center' }}> Bearbeiten</button>
<button onClick={() => setDelId(item.id)} style={{ ...S.btn('#ff6b9d', true), flex:1, textAlign:'center' }}> Löschen</button>
</div>
)}
<div style={{ display:'flex', gap:6, marginTop:10 }}>
<button onClick={() => setEditData(item)} style={{ ...S.btn('#4ecdc4', true), flex:1, textAlign:'center' }}> Bearbeiten</button>
<button onClick={() => del(item.id)} style={{ ...S.btn('#ff6b9d', true), flex:1, textAlign:'center' }}> Löschen</button>
</div>
</div>
))}
</div>