new core.middleware sets cookie for scroll timestamp view to local browser time, w. new corresponding tests in core.tests.UTs.test_middleware; apps.lyric.templatetags.lyric_extras determines timestamp format based on duration elapsed since timestamp; apps.bill.tests.ITs.test_views renamed, now also asserts scroll renders event body and time in columns
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<section id="id_drama_scroll" class="drama-scroll" data-scroll-position="{{ scroll_position|default:0 }}">
|
||||
{% for event in events %}
|
||||
<div class="drama-event {% if event.actor == viewer %}mine{% else %}theirs{% endif %}">
|
||||
<span class="event-body">
|
||||
<span class="drama-event-body">
|
||||
<strong>{{ event.actor|display_name }}</strong>
|
||||
{{ event.to_prose }}<br>
|
||||
<time class="event-time" datetime="{{ event.timestamp|date:'c' }}">
|
||||
{{ event.timestamp|date:"N j, g:i a" }}
|
||||
</time>
|
||||
{{ event.to_prose }}
|
||||
</span>
|
||||
<time class="drama-event-time" datetime="{{ event.timestamp|date:'c' }}">
|
||||
{{ event.timestamp|relative_ts }}
|
||||
</time>
|
||||
</div>
|
||||
{% empty %}
|
||||
<p class="event-empty"><small>No events yet.</small></p>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<script src="{% static "apps/applets/applets.js" %}"></script>
|
||||
<script src="{% static "apps/dashboard/game-kit.js" %}"></script>
|
||||
<script>
|
||||
document.cookie = 'user_tz=' + Intl.DateTimeFormat().resolvedOptions().timeZone + '; path=/; SameSite=Lax';
|
||||
document.body.addEventListener('htmx:configRequest', function(evt) {
|
||||
evt.detail.headers['X-CSRFToken'] = getCookie('csrftoken');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user