fix: set specific management displays for admin

吴宇涵 2023-03-20 20:15:58 +08:00
parent e2b165ada8
commit 13d8977636
2 changed files with 4 additions and 6 deletions

View File

@ -37,14 +37,11 @@
<body>
<div class="container-fluid">
<p><b>English Pal for <font id="username" color="red">{{ username }}</font></b>
<<<<<<< HEAD
{% if username == admin_name%}
<a class="btn btn-secondary" href="/admin" role="button" onclick="stopRead()">管理</a>
{% endif %}
<a class="btn btn-secondary" href="/logout" role="button" onclick="stopRead()">退出</a>
<a class="btn btn-secondary" href="/reset" role="button" onclick="stopRead()">重设密码</a>
=======
<a class="btn btn-secondary" href="/logout" role="button">退出</a>
<a class="btn btn-secondary" href="/reset" role="button">重设密码</a>
>>>>>>> master
</p>
{{ flashed_messages|safe }}

View File

@ -1,5 +1,5 @@
from datetime import datetime
from admin_service import ADMIN_NAME
from flask import *
# from app import Yaml
@ -131,6 +131,7 @@ def userpage(username):
for x in lst3:
words += x[0] + ' '
return render_template('userpage_get.html',
admin_name=ADMIN_NAME,
username=username,
session=session,
flashed_messages=get_flashed_messages_if_any(),