Первая версия, написанная гопотой. Не работает нормально лента и поиск, сломана авторизация

This commit is contained in:
2025-10-23 11:03:01 +03:00
parent d6ba7c0f50
commit ee255f651c
12 changed files with 632 additions and 0 deletions

31
app/templates/mod.html Normal file
View File

@@ -0,0 +1,31 @@
{% extends "base.html" %}
{% block title %}Модерация{% endblock %}
{% block content %}
<h2>Модерация — флаги</h2>
{% if flags %}
<table class="flags">
<thead><tr><th>ID</th><th>Post</th><th>Reason</th><th>Created</th><th>Resolved</th><th>Action</th></tr></thead>
<tbody>
{% for f in flags %}
<tr>
<td>{{ f.id }}</td>
<td><a href="{{ url_for('view_post', pid=f.post_id) }}">{{ f.title or ('#'+f.post_id|string) }}</a></td>
<td>{{ f.reason }}</td>
<td>{{ f.created_at }}</td>
<td>{{ 'yes' if f.resolved else 'no' }}</td>
<td>
{% if not f.resolved %}
<form action="{{ url_for('mod_resolve', fid=f.id) }}" method="post">
<button type="submit">Resolve</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>Нет флагов.</p>
{% endif %}
{% endblock %}