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

View File

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