1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Minor improvements

This commit is contained in:
krateng 2021-12-11 20:40:52 +01:00
parent 86f8d5a3eb
commit 98ec5885e7
3 changed files with 22 additions and 20 deletions

View File

@ -486,7 +486,8 @@ def timestamp_desc(t,short=False):
timeobj = datetime.fromtimestamp(t,tz=TIMEZONE) timeobj = datetime.fromtimestamp(t,tz=TIMEZONE)
if short: if not short: return timeobj.strftime(get_settings("TIME_FORMAT"))
difference = int(datetime.now().timestamp() - t) difference = int(datetime.now().timestamp() - t)
thresholds = ( thresholds = (
@ -503,8 +504,7 @@ def timestamp_desc(t,short=False):
for t,s in thresholds: for t,s in thresholds:
if difference < t: return s if difference < t: return s
else:
return timeobj.strftime(get_settings("TIME_FORMAT"))

View File

@ -31,7 +31,7 @@
<br/> <br/>
<span class="button" onclick="scrobbleNew(event)">Scrobble!</span> <span class="button" onclick="scrobbleNew(event)">Scrobble!</span>
<span class="button" onclick="repeatLast()">Last Manual Scrobble</span> <span class="button" onclick="repeatLast()"></span>
<br/> <br/>

View File

@ -16,15 +16,17 @@
</table> </table>
Kazuma, Aqua, Darkness and Megumin have been dispatched to deal with this situation.<br/><br/>
{% if adminmode %} {% if adminmode %}
You are only seeing this information because you are in admin mode: You are only seeing this information because you are in admin mode:
<br/><br/> <br/><br/>
<div style="white-space: pre-wrap; font-family: monospace;">{% autoescape true -%} <div style="white-space: pre-wrap; font-family: monospace;">{% autoescape true -%}
{{ traceback }} {{ traceback }}
{%- endautoescape %}</div> {%- endautoescape %}</div>
{% else %} <br/><br/>
Kazuma, Aqua, Darkness and Megumin have been dispatched to deal with this situation. If you think this shouldn't have happened, consider
<a class='textlink' href="https://github.com/krateng/maloja/issues/new">opening an issue</a>
describing the situation.
{% endif %} {% endif %}