Dateien nach "frontend/src" hochladen
This commit is contained in:
@@ -507,7 +507,7 @@ function QuickLinks({ toast, mobile }) {
|
||||
function TodoList({ toast }) {
|
||||
const [items, setItems] = useState([]);
|
||||
const [text, setText] = useState('');
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
useEffect(() => { api('/dashboard/todos').then(setItems).catch(() => {}); }, []);
|
||||
|
||||
const add = async () => {
|
||||
@@ -531,7 +531,9 @@ function TodoList({ toast }) {
|
||||
<div style={{ ...S.card, marginBottom:10 }}>
|
||||
<button onClick={()=>setIsOpen(v=>!v)} style={{width:'100%',background:'transparent',border:'none',
|
||||
display:'flex',justifyContent:'space-between',alignItems:'center',cursor:'pointer',padding:0}}>
|
||||
<div style={S.head}>TO-DO {items.filter(i=>!i.done).length > 0 && <span style={{color:'#4ecdc4',fontFamily:'monospace',fontSize:10}}>({items.filter(i=>!i.done).length})</span>}</div>
|
||||
<div style={S.head}>TO-DO{items.filter(i=>!i.done).length > 0
|
||||
? <span style={{color:'#4ecdc4',fontFamily:'monospace',fontSize:10,marginLeft:6}}>({items.filter(i=>!i.done).length})</span>
|
||||
: null}</div>
|
||||
<span style={{color:'rgba(255,255,255,0.4)',fontSize:11,display:'inline-block',
|
||||
transform:isOpen?'rotate(90deg)':'rotate(0)',transition:'transform 0.2s'}}>▶</span>
|
||||
</button>
|
||||
@@ -580,7 +582,7 @@ function Notepad({ toast }) {
|
||||
const [content, setContent] = useState('');
|
||||
const [saved, setSaved] = useState(true);
|
||||
const [saveTime, setSaveTime] = useState(null);
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const tmr = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -597,17 +599,16 @@ function Notepad({ toast }) {
|
||||
|
||||
return (
|
||||
<div style={{ ...S.card }}>
|
||||
<div style={{ display:'flex', justifyContent:'space-between', alignItems:'center', marginBottom: isOpen ? 8 : 0 }}>
|
||||
<button onClick={()=>setIsOpen(v=>!v)} style={{background:'transparent',border:'none',
|
||||
display:'flex',alignItems:'center',gap:8,cursor:'pointer',padding:0,flex:1}}>
|
||||
<button onClick={()=>setIsOpen(v=>!v)} style={{width:'100%',background:'transparent',border:'none',
|
||||
display:'flex',justifyContent:'space-between',alignItems:'center',cursor:'pointer',padding:0}}>
|
||||
<div style={S.head}>NOTIZEN</div>
|
||||
<span style={{color:'rgba(255,255,255,0.4)',fontSize:11,display:'inline-block',
|
||||
transform:isOpen?'rotate(90deg)':'rotate(0)',transition:'transform 0.2s'}}>▶</span>
|
||||
</button>
|
||||
{isOpen && <div style={{ color: saved ? 'rgba(78,205,196,0.5)' : 'rgba(255,230,109,0.6)', fontSize:10, fontFamily:'monospace' }}>
|
||||
{isOpen && <div style={{ color: saved ? 'rgba(78,205,196,0.5)' : 'rgba(255,230,109,0.6)',
|
||||
fontSize:10, fontFamily:'monospace', marginTop:4, marginBottom:6, textAlign:'right' }}>
|
||||
{saved ? (saveTime ? `✓ ${new Date(saveTime).toLocaleTimeString('de-DE', { hour:'2-digit', minute:'2-digit' })}` : '✓') : '…'}
|
||||
</div>}
|
||||
</div>
|
||||
{isOpen && <textarea value={content} onChange={e => change(e.target.value)}
|
||||
placeholder="Notizen, IPs, Zugangsdaten…"
|
||||
style={{ ...S.inp, width:'100%', minHeight:140, resize:'vertical', lineHeight:1.7, padding:'10px 12px', fontSize:14 }} />}
|
||||
|
||||
Reference in New Issue
Block a user