feat: 导航栏下方添加显眼会员状态栏
- guest: 灰色提示登录注册 - free: 蓝色提示升级 - vip_basic: 绿色显示权益和到期 - vip_pro: 金色显示权益和升级提示 - vip_enterprise: 深色显示无限权益 - admin: 红色显示后台入口
This commit is contained in:
@@ -37,6 +37,45 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- 会员状态栏 -->
|
||||
{% if user %}
|
||||
{% if user.user_type == 'vip_enterprise' %}
|
||||
<div class="alert alert-dark py-2 mb-0 text-center">
|
||||
<strong>👑 企业会员</strong> |
|
||||
无限翻译次数 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||
</div>
|
||||
{% elif user.user_type == 'vip_pro' %}
|
||||
<div class="alert alert-warning py-2 mb-0 text-center">
|
||||
<strong>⭐ 专业会员</strong> |
|
||||
每日200次 · 最多500页 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||
| <a href="/pricing" class="alert-link">升级企业会员享无限</a>
|
||||
</div>
|
||||
{% elif user.user_type == 'vip_basic' %}
|
||||
<div class="alert alert-success py-2 mb-0 text-center">
|
||||
<strong>💚 基础会员</strong> |
|
||||
每日50次 · 最多100页 | 到期:{{ user.membership_expire.strftime('%Y-%m-%d') if user.membership_expire else '永久' }}
|
||||
| <a href="/pricing" class="alert-link">升级享更多权益</a>
|
||||
</div>
|
||||
{% elif user.user_type == 'free' %}
|
||||
<div class="alert alert-info py-2 mb-0 text-center">
|
||||
<strong>👤 免费用户</strong> |
|
||||
每日10次 · 最多50页 | <a href="/pricing" class="alert-link">升级会员解锁更多功能</a>
|
||||
</div>
|
||||
{% elif user.user_type == 'admin' %}
|
||||
<div class="alert alert-danger py-2 mb-0 text-center">
|
||||
<strong>🔧 管理员</strong> |
|
||||
完整权限 | <a href="/admin" class="alert-link">进入后台管理</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="alert alert-secondary py-2 mb-0 text-center">
|
||||
<strong>👁 访客模式</strong> |
|
||||
每日仅3次 · 最多20页 · 功能受限 |
|
||||
<a href="/login" class="alert-link">登录获取更多权益</a> 或
|
||||
<a href="/register" class="alert-link">免费注册</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- 主内容 -->
|
||||
<main class="container my-5">
|
||||
<!-- 用户信息卡片 -->
|
||||
|
||||
Reference in New Issue
Block a user