This repository has been archived on 2023-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
web-gpt/project/templates/profile.html

59 lines
2.0 KiB
HTML
Raw Normal View History

2023-03-31 22:11:34 +08:00
{% extends "base.html" %}
{% block content %}
2023-04-02 02:05:33 +08:00
<h1 class="title">欢迎回来,{{ user.name }}!</h1>
{% if user.isActivated %}
<h3 class="subtitle text-left">账户状态:</h3>
<!-- <h3 class="subtitle" style="text-align: left;">服务状态:</h3> -->
{% if user.role=='admin' %}
<!-- admin -->
<h3 class="subtitle text-left">注册账户列表:</h3>
<table class="table" id="account-list-table">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">
<a href="{{ url_for('main.manage') }}">管理</a>
</th>
<th scope="col">邮箱</th>
<th scope="col">用户名</th>
<th scope="col">角色</th>
<th scope="col">已激活</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr id="{{ 'account-%d'|format(account.id) }}">
<td scope="row">{{ account.id }}</td>
<td>
<a href="{{ url_for('main.manage', id=account.id) }}">管理</a>
</td>
<td>{{ account.email }}</td>
<td>{{ account.name }}</td>
<td>{{ account.role }}</td>
<td>
{% if account.isActivated %}
{% else %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<script>
2023-04-01 19:38:43 +08:00
var account_list = document.getElementById("account-{{ user.id }}");
account_list.style.backgroundColor = "lightblue";
2023-04-02 02:05:33 +08:00
</script>
{% else %}
<!-- user -->
{% endif %}
{% else %}
<!-- 未激活 -->
<p class="text-warning">您的账号暂未激活,请等待管理员激活此账号。</p>
{% endif %}
{% with messages = get_flashed_messages() %}
{% if messages %}<div class="notification is-danger">{{ messages[0] }}</div>{% endif %}
{% endwith %}
{% endblock content %}