Add last updated timestamp to patrons

This commit is contained in:
Zedifus 2021-11-18 21:08:19 +00:00
parent 134dcf00d3
commit 6eb4f313f9
2 changed files with 3 additions and 1 deletions

View File

@ -87,9 +87,11 @@ class PanelHandler(BaseHandler):
elif page == 'credits':
with open(helper.credits_cache) as republic_credits_will_do:
credits = json.load(republic_credits_will_do)
timestamp = credits["lastUpdate"] / 1000.0
page_data["patrons"] = credits["patrons"]
page_data["staff"] = credits["staff"]
page_data["translations"] = credits["translations"]
page_data["lastUpdate"] = str(datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S'))
template = "panel/credits.html"
elif page == 'contribute':

View File

@ -232,7 +232,7 @@
<div class="card">
<div class="card-body">
<h4 class="card-title">Patreon Supporters</h4>
<p class="card-description"> A huge <code>thank you</code>&nbsp; to our Patreon supporters </p>
<p class="card-description"> A huge <code>thank you</code>&nbsp; to our Patreon supporters! | <span style="color: #9365B8">Last Update: {{ data["lastUpdate"] }}</span></p>
<table class="table table-hover">
<thead>
<tr>