129 lines
8.4 KiB
HTML
129 lines
8.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="{{ 'zh-CN' if lang == 'zh' else 'en' }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="robots" content="noindex,follow">
|
|
<title>{{ l('通知中心', 'Notifications') }} - {{ l('论坛', 'Forum') }}</title>
|
|
<link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='img/site-logo-mark.svg') }}">
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
<link rel="stylesheet" href="/static/css/forum.css">
|
|
</head>
|
|
<body class="forum-page">
|
|
<header class="forum-header">
|
|
<div class="forum-header-inner">
|
|
<div class="forum-header-left">
|
|
<a href="{{ url_for('forum_index') }}" class="forum-logo">
|
|
<img src="{{ url_for('static', filename='img/site-logo-mark.svg') }}" alt="{{ l('云价眼 Logo', 'VPS Price Logo') }}">
|
|
<span>{{ l('云价眼论坛', 'VPS Price Forum') }}</span>
|
|
</a>
|
|
<nav class="forum-primary-nav">
|
|
<a href="{{ url_for('forum_index') }}">{{ l('最新', 'Latest') }}</a>
|
|
<a href="{{ url_for('index') }}">{{ l('价格表', 'Pricing') }}</a>
|
|
<a href="{{ url_for('user_profile') }}">{{ l('个人中心', 'Profile') }}</a>
|
|
<a href="{{ url_for('user_notifications') }}" class="active nav-link-with-badge">{{ l('通知', 'Notifications') }}{% if notifications_unread_count %}<span class="nav-badge">{{ notifications_unread_count }}</span>{% endif %}</a>
|
|
</nav>
|
|
</div>
|
|
<div class="forum-header-right">
|
|
<span class="lang-switch">
|
|
<a href="{{ lang_url('zh') }}" class="{{ 'active' if lang == 'zh' else '' }}" title="切换到中文">中文</a>
|
|
<span class="lang-sep">|</span>
|
|
<a href="{{ lang_url('en') }}" class="{{ 'active' if lang == 'en' else '' }}" title="Switch to English">English</a>
|
|
</span>
|
|
<span class="forum-user-chip">{{ current_user.username }}</span>
|
|
<a href="{{ url_for('user_logout') }}" class="forum-link">{{ l('退出', 'Logout') }}</a>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="forum-shell">
|
|
<section class="profile-layout">
|
|
<div class="profile-main">
|
|
<article class="topic-post-card profile-summary">
|
|
<h1>{{ l('通知中心', 'Notifications') }}</h1>
|
|
<p class="editor-subtitle">{{ l('查看别人对你帖子/评论的互动,以及举报处理结果。', 'Track interactions on your posts/comments and report outcomes.') }}</p>
|
|
<div class="profile-stat-grid">
|
|
<div><span>{{ l('总通知', 'Total') }}</span><strong>{{ total_count }}</strong></div>
|
|
<div><span>{{ l('未读', 'Unread') }}</span><strong>{{ unread_count }}</strong></div>
|
|
<div><span>{{ l('已读', 'Read') }}</span><strong>{{ read_count }}</strong></div>
|
|
<div><span>{{ l('当前筛选', 'Current Filter') }}</span><strong>{{ l('未读', 'Unread') if active_status == 'unread' else l('已读', 'Read') if active_status == 'read' else l('全部', 'All') }}</strong></div>
|
|
</div>
|
|
</article>
|
|
|
|
<section class="topic-post-card">
|
|
<div class="notification-topline">
|
|
<div class="forum-tabs profile-tabs">
|
|
<a href="{{ url_for('user_notifications', status='all') }}" class="{{ 'active' if active_status == 'all' else '' }}">{{ l('全部', 'All') }}</a>
|
|
<a href="{{ url_for('user_notifications', status='unread') }}" class="{{ 'active' if active_status == 'unread' else '' }}">{{ l('未读', 'Unread') }}</a>
|
|
<a href="{{ url_for('user_notifications', status='read') }}" class="{{ 'active' if active_status == 'read' else '' }}">{{ l('已读', 'Read') }}</a>
|
|
</div>
|
|
<form method="post" action="{{ url_for('user_notifications_read_all') }}">
|
|
<button type="submit" class="forum-btn-muted">{{ l('全部标记已读', 'Mark All Read') }}</button>
|
|
</form>
|
|
</div>
|
|
|
|
{% if message %}
|
|
<p class="form-success">{{ message }}</p>
|
|
{% endif %}
|
|
{% if error %}
|
|
<p class="form-error">{{ error }}</p>
|
|
{% endif %}
|
|
|
|
{% if notification_items %}
|
|
<ul class="notification-list">
|
|
{% for item in notification_items %}
|
|
{% set n = item.notification %}
|
|
<li class="notification-row {{ '' if n.is_read else 'unread' }}">
|
|
<div class="notification-body">
|
|
<div class="notification-head">
|
|
<span class="status-pill {{ 'active' if not n.is_read else 'inactive' }}">{{ l('未读', 'Unread') if not n.is_read else l('已读', 'Read') }}</span>
|
|
<span class="topic-category">{{ item.type_label }}</span>
|
|
<span>{{ item.time_text }}</span>
|
|
{% if item.actor_name %}
|
|
<span>{{ l('来自', 'From') }} {{ item.actor_name }}</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="notification-message">{{ n.message }}</div>
|
|
</div>
|
|
<div class="notification-actions">
|
|
<a href="{{ url_for('user_notification_go', notification_id=n.id) }}" class="forum-btn-primary">{{ l('查看', 'Open') }}</a>
|
|
{% if not n.is_read %}
|
|
<form method="post" action="{{ url_for('user_notification_read', notification_id=n.id) }}">
|
|
<input type="hidden" name="next" value="{{ request.full_path if request.query_string else request.path }}">
|
|
<button type="submit" class="forum-btn-muted">{{ l('标记已读', 'Mark Read') }}</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p class="topic-empty">{{ l('当前没有通知。', 'No notifications right now.') }}</p>
|
|
{% endif %}
|
|
</section>
|
|
</div>
|
|
|
|
<aside class="forum-sidebar">
|
|
<div class="side-card">
|
|
<h3>{{ l('通知说明', 'Notification Types') }}</h3>
|
|
<ul class="side-list">
|
|
<li><span>{{ l('帖子新评论', 'New comment') }}</span><strong>{{ l('别人评论你的帖子', 'Someone commented on your topic') }}</strong></li>
|
|
<li><span>{{ l('主题新回复', 'New reply') }}</span><strong>{{ l('别人回复你参与的主题', 'Someone replied to a topic you joined') }}</strong></li>
|
|
<li><span>{{ l('举报处理结果', 'Report update') }}</span><strong>{{ l('你发起的举报被处理', 'Your submitted report was processed') }}</strong></li>
|
|
<li><span>{{ l('内容处理通知', 'Content moderation') }}</span><strong>{{ l('你的内容被处理', 'Your content was moderated') }}</strong></li>
|
|
</ul>
|
|
</div>
|
|
<div class="side-card">
|
|
<h3>{{ l('快捷操作', 'Quick Actions') }}</h3>
|
|
<div class="form-actions">
|
|
<a href="{{ url_for('forum_post_new') }}" class="forum-btn-primary">{{ l('发布主题', 'New Topic') }}</a>
|
|
<a href="{{ url_for('user_profile') }}" class="forum-btn-muted">{{ l('返回个人中心', 'Back to Profile') }}</a>
|
|
<a href="{{ url_for('forum_index') }}" class="forum-btn-muted">{{ l('返回论坛', 'Back to Forum') }}</a>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|