Compare commits
3 Commits
4d02f51304
...
6600d5e346
| Author | SHA1 | Date | |
|---|---|---|---|
| 6600d5e346 | |||
| 971e52564b | |||
| 82dbc6b076 |
@@ -1962,7 +1962,7 @@ def submission_detail(sub_id: int):
|
||||
<form method="post" action="/submission/{row['id']}/update-summary" style="margin-left:0.5rem;">
|
||||
<button type="submit" class="btn btn-publish-big" name="action" value="publish" {'disabled' if row['status'] in ('published','gdpr_deleted') else ''} style="padding:0.4rem 1.2rem;font-size:0.8rem;white-space:nowrap;">📢 Veröffentlichen</button>
|
||||
</form>
|
||||
{"".join([f'<button type="button" id="unpublish-btn" class="btn btn-publish" style="padding:0.35rem 0.8rem;font-size:0.75rem;white-space:nowrap;background:rgba(255,193,7,0.18);color:#ffc107;border:1px solid rgba(255,193,7,0.3);">\u2b05\ufe0f Ver\u00f6ffentlichung zur\u00fccknehmen</button>' if row['status'] == 'published' else ''])}</header>
|
||||
{''.join([f'<button type="button" id="unpublish-btn" class="btn btn-publish" style="padding:0.35rem 0.8rem;font-size:0.75rem;white-space:nowrap;background:rgba(255,193,7,0.18);color:#ffc107;border:1px solid rgba(255,193,7,0.3);">\u2b05\ufe0f Ver\u00f6ffentlichung zur\u00fccknehmen</button>' if row['status'] == 'published' else ''])}</header>
|
||||
<main class="detail-main">
|
||||
|
||||
<div class="card">
|
||||
@@ -2821,7 +2821,7 @@ def public_frontend():
|
||||
<div class="meta-spacer"></div>
|
||||
<span class="card-meta-item"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#9CA3AF" stroke-width="1.5" stroke-linecap="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>{r['views'] or 0}</span>
|
||||
<span class="card-meta-item"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#9CA3AF" stroke-width="1.5" stroke-linecap="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>{r['comment_count'] or 0}</span>
|
||||
<button class="stat-like-btn" data-id="{r['id']}" data-likes="{r['likes'] or 0}"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#D1D5DB" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg> <span class="like-count">{r['likes'] or 0}</span></button>
|
||||
<button class="stat-like-btn" data-id="{r['id']}" data-likes="{r['likes'] or 0}"><svg width="14" height="14" viewBox="0 0 24 24" fill="#EF4444" stroke="#EF4444" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg> <span class="like-count">{r['likes'] or 0}</span></button>
|
||||
</div>"""
|
||||
|
||||
is_ausverkauft = r["category"] == "ausverkauft" and r["spiel_titel"]
|
||||
@@ -2954,10 +2954,10 @@ def public_frontend():
|
||||
|
||||
/* Like button — subtle outline */
|
||||
.stat-like-btn { background:none; border:1px solid #E5E7EB; border-radius:999px; padding:0.25rem 0.6rem; font-size:0.72rem; cursor:pointer; color:#9CA3AF; font-family:inherit; transition:all 0.15s; display:flex; align-items:center; gap:0.2rem; -webkit-tap-highlight-color:transparent; min-width:44px; min-height:36px; justify-content:center; }
|
||||
.stat-like-btn svg, .stat-like-btn svg path { stroke:#D1D5DB !important; }
|
||||
.stat-like-btn svg, .stat-like-btn svg path { stroke:#EF4444 !important; fill:#EF4444 !important; }
|
||||
.stat-like-btn:hover { border-color:#9CA3AF; color:#6B7280; }
|
||||
.stat-like-btn.liked { background:#EF4444; color:#fff; border-color:#EF4444; }
|
||||
.stat-like-btn.liked svg, .stat-like-btn.liked svg path { stroke:#fff !important; }
|
||||
.stat-like-btn.liked svg, .stat-like-btn.liked svg path { stroke:#fff !important; fill:#fff !important; }
|
||||
.stat-like-btn:active { transform:scale(0.96); }
|
||||
|
||||
/* Filter bar */
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ def process_whatsapp_submission(db: sqlite3.Connection, payload: dict) -> str:
|
||||
|
||||
db.execute(
|
||||
"""INSERT INTO submissions
|
||||
(sender_id, sender_name, source, type, content, payload_json, created_at)
|
||||
(sender_id, sender_name, channel, type, content, payload_json, created_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)""",
|
||||
(
|
||||
sender_id,
|
||||
@@ -153,7 +153,7 @@ def process_telegram_submission(db: sqlite3.Connection, payload: dict) -> str:
|
||||
|
||||
db.execute(
|
||||
"""INSERT INTO submissions
|
||||
(sender_id, sender_name, source, type, content, payload_json, created_at)
|
||||
(sender_id, sender_name, channel, type, content, payload_json, created_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)""",
|
||||
(
|
||||
sender_id,
|
||||
|
||||
Reference in New Issue
Block a user