Fix: Magic-Link URL, Sidebar-Ladereihenfolge, Archiv-Standard + Geoparse-Button
- Magic-Link URL korrigiert: /auth/verify -> / (Login-Seite mit Token-Param)
- Sidebar: loadIncidents() vor NotificationCenter.init() verschoben
- NotificationCenter.init() in try/catch gewrappt
- Archiv-Sektion default geschlossen (display:none im HTML)
- Neuer Endpunkt POST /incidents/{id}/geoparse fuer bestehende Artikel
- "Orte erkennen"-Button in Karten-Kachel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -461,8 +461,15 @@ const App = {
|
||||
document.getElementById('fb-char-count').textContent = e.target.value.length.toLocaleString('de-DE');
|
||||
});
|
||||
|
||||
// Sidebar-Chevrons initial auf offen setzen (Archiv geschlossen)
|
||||
document.querySelectorAll('.sidebar-chevron').forEach(c => c.classList.add('open'));
|
||||
document.getElementById('chevron-archived-incidents').classList.remove('open');
|
||||
|
||||
// Lagen laden (frueh, damit Sidebar sofort sichtbar)
|
||||
await this.loadIncidents();
|
||||
|
||||
// Notification-Center initialisieren
|
||||
await NotificationCenter.init();
|
||||
try { await NotificationCenter.init(); } catch (e) { console.warn('NotificationCenter:', e); }
|
||||
|
||||
// WebSocket
|
||||
WS.connect();
|
||||
@@ -472,14 +479,6 @@ const App = {
|
||||
WS.on('refresh_error', (msg) => this.handleRefreshError(msg));
|
||||
WS.on('refresh_cancelled', (msg) => this.handleRefreshCancelled(msg));
|
||||
|
||||
// Sidebar-Chevrons initial auf offen setzen (Archiv geschlossen)
|
||||
document.querySelectorAll('.sidebar-chevron').forEach(c => c.classList.add('open'));
|
||||
document.getElementById('archived-incidents').style.display = 'none';
|
||||
document.getElementById('chevron-archived-incidents').classList.remove('open');
|
||||
|
||||
// Lagen laden
|
||||
await this.loadIncidents();
|
||||
|
||||
// Laufende Refreshes wiederherstellen
|
||||
try {
|
||||
const data = await API.getRefreshingIncidents();
|
||||
@@ -1430,6 +1429,24 @@ const App = {
|
||||
}
|
||||
},
|
||||
|
||||
async triggerGeoparse() {
|
||||
if (!this.currentIncidentId) return;
|
||||
const btn = document.getElementById('geoparse-btn');
|
||||
if (btn) { btn.disabled = true; btn.textContent = 'Erkennung...'; }
|
||||
try {
|
||||
const result = await API.triggerGeoparse(this.currentIncidentId);
|
||||
UI.showToast(result.message, result.new_locations > 0 ? 'success' : 'info');
|
||||
if (result.new_locations > 0) {
|
||||
const locations = await API.getLocations(this.currentIncidentId).catch(() => []);
|
||||
UI.renderMap(locations);
|
||||
}
|
||||
} catch (err) {
|
||||
UI.showToast('Geoparsing fehlgeschlagen: ' + err.message, 'error');
|
||||
} finally {
|
||||
if (btn) { btn.disabled = false; btn.textContent = 'Orte erkennen'; }
|
||||
}
|
||||
},
|
||||
|
||||
_formatInterval(minutes) {
|
||||
if (minutes >= 10080 && minutes % 10080 === 0) {
|
||||
const w = minutes / 10080;
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren