48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h1 class="title">
|
|
欢迎回来,{{ user.name }}!
|
|
</h1>
|
|
{% if user.isActivated %}
|
|
<h3 class="subtitle" style="text-align: left;">账户状态:</h3>
|
|
<!-- <h3 class="subtitle" style="text-align: left;">服务状态:</h3> -->
|
|
{% if user.role=='admin' %}
|
|
<!-- admin -->
|
|
<h3 class="subtitle" style="text-align: 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>
|
|
var account_list = document.getElementById("account-{{ user.id }}");
|
|
account_list.style.backgroundColor = "lightblue";
|
|
</script>
|
|
{% else %}
|
|
<!-- user -->
|
|
{% endif %}
|
|
{% else %}
|
|
<!-- 未激活 -->
|
|
<p class="text-warning">您的账号暂未激活,请等待管理员激活此账号。</p>
|
|
{% endif %}
|
|
{% endblock %} |