diff --git a/article_server.py b/article_server.py
index 76c5c12..04e26d2 100644
--- a/article_server.py
+++ b/article_server.py
@@ -307,6 +307,9 @@ def build_index(articles: list[dict]) -> str:
.live-toggle-label:hover {{ border-color: var(--accent); }}
.live-toggle-label:has(input:checked) {{ background: #fef2f2; border-color: #dc3545; color: #dc3545; }}
.live-toggle-label input {{ accent-color: #dc3545; }}
+
+ .rubric-live-select {{ font-family: var(--font); font-size: 0.8rem; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); cursor: pointer; }}
+ .rubric-live-select:focus {{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(32,34,138,0.15); }}
.upload-label {{ display: inline-flex; }}
.token-indicator {{ font-size: 0.7rem; margin-left: 0.6rem; opacity: 0.8; }}
@@ -434,6 +437,20 @@ def build_index(articles: list[dict]) -> str:
đź”´ Live
+
0 markiert
@@ -612,6 +629,12 @@ def build_index(articles: list[dict]) -> str:
const selected = Array.from(document.querySelectorAll('.article-check:checked')).map(cb => cb.value);
if (selected.length === 0) return;
const live = document.getElementById('liveToggle').checked;
+ const rubric = document.getElementById('rubricSelect').value;
+
+ if (live && rubric === '0') {{
+ showToast('❌ Bitte eine Rubrik wählen (Dropdown rechts neben 🔴 Live)', true);
+ return;
+ }}
// Readiness-Warnung (soft, blockiert nicht)
const notReady = [];
@@ -623,7 +646,8 @@ def build_index(articles: list[dict]) -> str:
}});
let confirmMsg;
if (live) {{
- confirmMsg = '🔴 LIVE: ' + selected.length + ' Artikel ÖFFENTLICH veröffentlichen?\\n\\nDies ist für 10.000+ Leser sichtbar!';
+ const rubricName = document.getElementById('rubricSelect').selectedOptions[0].text;
+ confirmMsg = '🔴 LIVE in »' + rubricName + '«: ' + selected.length + ' Artikel ÖFFENTLICH veröffentlichen?\\n\\nDies ist für 10.000+ Leser sichtbar!';
}} else {{
confirmMsg = selected.length + ' Artikel auf KORREKTUR hochladen?\\n\\nNur Redaktion sichtbar. Sicher.';
}}
@@ -640,7 +664,7 @@ def build_index(articles: list[dict]) -> str:
const resp = await fetch('/publish', {{
method: 'POST',
headers: {{'Content-Type': 'application/json', 'Authorization': 'Basic ' + auth}},
- body: JSON.stringify({{files: selected, live: live}})
+ body: JSON.stringify({{files: selected, live: live, rubric: parseInt(rubric)}})
}});
const data = await resp.json();
if (data.ok) {{
@@ -1011,6 +1035,7 @@ h1{color:#c0392b;}p{color:#888;}
data = json.loads(body)
files = data.get("files", [])
allow_live = data.get("live", False) # SAFETY GATE: Nur wenn explizit true
+ rubric = data.get("rubric", 0) # 0 = nicht gesetzt
except json.JSONDecodeError:
self._json_reply(400, {"ok": False, "error": "Invalid JSON"})
return
@@ -1091,10 +1116,11 @@ h1{color:#c0392b;}p{color:#888;}
jid_match = re.search(r' 0:
+ catid = rubric
+ elif allow_live:
cat_match = re.search(r'