3
2
forked from Dniel97/artemis

idac: remove hanging "'s" on frontend if the person viewing the page doesn't have a profile

This commit is contained in:
Hay1tsme 2024-01-09 21:03:58 -05:00
parent 0a56207e90
commit d01ceab92f
2 changed files with 8 additions and 7 deletions

View File

@ -127,10 +127,11 @@ class IDACFrontend(FE_Base):
ticket_data = await self.data.item.get_tickets(user_id)
rank = await self.data.profile.get_profile_rank(user_id, self.version)
tickets = {
self.ticket_names[ticket["ticket_id"]]: ticket["ticket_cnt"]
for ticket in ticket_data
}
if ticket_data:
tickets = {
self.ticket_names[ticket["ticket_id"]]: ticket["ticket_cnt"]
for ticket in ticket_data
}
return Response(template.render(
title=f"{self.core_config.server.name} | {self.nav_name}",

View File

@ -4,9 +4,10 @@
{% if sesh is defined and sesh["user_id"] > 0 %}
<div class="card mb-3">
<div class="card-body">
<div class="card-body">
{% if profile is defined and profile is not none %}
<div class="card-title">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
<h3>{{ sesh["username"] }}'s Profile</h3>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group me-2">
@ -18,7 +19,6 @@
</div>
</div>
<!--<h4 class="card-subtitle mb-2 text-body-secondary">Card subtitle</h4>-->
{% if profile is defined and profile is not none %}
<div class="row d-flex justify-content-center h-100">
<div class="col col-lg-3 col-12">
<div class="card mb-3">