diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index 7ca2049..c139e4c 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -948,7 +948,7 @@ function AdminPanel({ toast, mobile, user }) {
- {[['profil','Profil'], ...(user?.role==='admin'?[['benutzer','Benutzer'],['backup','Backup']]:[])]
+ {[['profil','Profil'],['dashboard','Dashboard'], ...(user?.role==='admin'?[['benutzer','Benutzer'],['backup','Backup']]:[])]
.map(([k,l]) => (
-
-
-
Löscht deinen Account und alle deine Daten unwiderruflich.
@@ -1026,6 +1023,14 @@ function AdminPanel({ toast, mobile, user }) {
)}
+ {section === 'dashboard' && (
+
+
+
+
+
+ )}
+
{section === 'backup' && (
diff --git a/frontend/src/calendar.jsx b/frontend/src/calendar.jsx
index 443e92e..c060e67 100644
--- a/frontend/src/calendar.jsx
+++ b/frontend/src/calendar.jsx
@@ -93,7 +93,6 @@ export default function CalendarWidget() {
const [selected, setSelected] = useState(null); // date object
const [errors, setErrors] = useState([]);
- const [debug, setDebug] = useState([]);
// Load all feeds
const loadFeeds = async (feedList) => {
@@ -102,33 +101,23 @@ export default function CalendarWidget() {
setErrors([]);
const all = [];
const errs = [];
- const dbg = [];
- dbg.push(`Feeds: ${feedList.length}`);
for (const f of feedList) {
try {
- dbg.push(`Lade: ${f.name} (${f.url.slice(0,50)}…)`);
const res = await fetch(`/api/calendar/fetch?url=${encodeURIComponent(f.url)}`, {
headers: { Authorization: `Bearer ${localStorage.getItem('sk_token')}` }
});
- dbg.push(`HTTP: ${res.status}`);
if (res.ok) {
const text = await res.text();
- dbg.push(`Bytes: ${text.length}, VCALENDAR: ${text.includes('BEGIN:VCALENDAR')}, VEVENTs: ${(text.match(/BEGIN:VEVENT/g)||[]).length}`);
- dbg.push(`Inhalt (erste 200 Zeichen): ${text.slice(0,200).replace(/\n/g,' ')}`);
const evs = parseIcal(text).map(e => ({ ...e, color: f.color, feedName: f.name }));
- dbg.push(`Geparst: ${evs.length} Termine`);
- if (evs.length > 0) dbg.push(`Erstes: ${evs[0].summary} @ ${evs[0].dtstart}`);
all.push(...evs);
} else {
const d = await res.json().catch(()=>({error:'Unbekannter Fehler'}));
errs.push(`${f.name}: ${d.error}`);
- dbg.push(`Fehler: ${d.error}`);
}
- } catch(e) { errs.push(`${f.name}: ${e.message}`); dbg.push(`Exception: ${e.message}`); }
+ } catch(e) { errs.push(`${f.name}: ${e.message}`); }
}
setEvents(all);
setErrors(errs);
- setDebug(dbg);
setLoading(false);
};
@@ -270,16 +259,7 @@ export default function CalendarWidget() {
)}
- {/* Debug Panel */}
- {debug.length > 0 && (
-
-
DEBUG
- {debug.map((d,i) => (
-
{d}
- ))}
-
- )}
+
)}