fix messed up table

This commit is contained in:
aronwk-aaron 2024-03-11 12:33:33 -05:00
parent d6b0a91e4d
commit f3e2254330
2 changed files with 10 additions and 20 deletions

View File

@ -252,6 +252,9 @@ def get():
# Delete
# </a>
if not current_app.config["USER_ENABLE_EMAIL"]:
account["2"] = '''N/A'''
if account["4"]:
account["4"] = '''<h2 class="far fa-times-circle text-danger"></h2>'''
else:
@ -267,20 +270,11 @@ def get():
else:
account["6"] = '''<h2 class="far fa-check-square text-success"></h2>'''
if current_app.config["USER_ENABLE_EMAIL"]:
if account["8"]:
if not current_app.config["USER_ENABLE_EMAIL"]:
account["8"] = '''<h2 class="far fa-times-circle text-muted"></h2>'''
elif account["8"]:
account["8"] = '''<h2 class="far fa-check-square text-success"></h2>'''
else:
account["8"] = '''<h2 class="far fa-times-circle text-danger"></h2>'''
else:
# shift columns to fill in gap of 2
account["2"] = account["3"]
account["3"] = account["4"]
account["4"] = account["5"]
account["5"] = account["6"]
account["6"] = account["7"]
# remove last two columns
del account["7"]
del account["8"]
return data

View File

@ -14,17 +14,13 @@
<tr>
<th>Actions</th>
<th>Name</th>
{% if config.USER_ENABLE_EMAIL %}
<th>Email</th>
{% endif %}
<th>GM Level</th>
<th>Locked</th>
<th>Banned</th>
<th>Muted</th>
<th>Registered</th>
{% if config.USER_ENABLE_EMAIL %}
<th>Email Confirmed</th>
{% endif %}
</tr>
</thead>
<tbody></tbody>