diff --git a/static/index.html b/static/index.html
index a0383465..03bffa5b 100644
--- a/static/index.html
+++ b/static/index.html
@@ -116,6 +116,7 @@ body { background: #0f0f13; color: #e2e8f0; }
+
πΈ δΈδΌ
@@ -129,6 +130,7 @@ body { background: #0f0f13; color: #e2e8f0; }
@@ -3131,6 +3133,42 @@ function renderAlerts(alerts) {
// refreshAll ε
θζΈ²ζοΌζ alerts δΊ€η» renderAlerts
+
+function loadBroadcast() {
+ var el = document.getElementById('broadcast-list');
+ if (!el) return;
+ fetch('/api/broadcast/recent?hours=72&limit=100').then(function(r){return r.json()}).then(function(data) {
+ if (!data.length) { el.innerHTML = '
No messages
'; return; }
+ var h = '';
+ var cat_colors = {trading:'#22c55e',system_error:'#ef4444',health:'#3b82f6',market:'#f59e0b',news:'#8b5cf6',strategy:'#06b6d4',general:'#6b7280'};
+ var cat_labels = {trading:'Trading',system_error:'Error',health:'Health',market:'Market',news:'News',strategy:'Strategy',general:'System'};
+ data.forEach(function(m) {
+ var color = cat_colors[m.category] || '#6b7280';
+ var cat_label = cat_labels[m.category] || m.category;
+ var preview = m.content.length > 120 ? m.content.slice(0,120) + '...' : m.content;
+ var time = (m.ts||'').slice(0,16).replace('T',' ');
+ h += '
';
+ h += '
';
+ h += ''+cat_label+'';
+ h += ''+time+'';
+ if (m.title) h += ''+m.title+'';
+ h += '
';
+ h += '
'+esc(preview)+'
';
+ h += '
';
+ });
+ el.innerHTML = h;
+ }).catch(function(e) { el.innerHTML = '
Error: '+e.message+'
'; });
+}
+function showBroadcastDetail(el) {
+ var content = el.getAttribute('data-content');
+ var title = el.getAttribute('data-title');
+ var modal = document.createElement('div');
+ modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/60';
+ modal.onclick = function(e) { if (e.target === modal) modal.remove(); };
+ modal.innerHTML = '
'+(title||'Detail')+'
'+esc(content)+'
';
+ document.body.appendChild(modal);
+}
+