added logging
This commit is contained in:
@@ -171,7 +171,10 @@
|
||||
{% for password in passwords %}
|
||||
<tr class="border-b border-border hover:bg-background/30">
|
||||
<td class="px-4 py-2 font-medium">{{ password.value }}</td>
|
||||
<td class="px-4 py-2">{{ password.expires_at }}</td>
|
||||
<td class="px-4 py-2 local-time"
|
||||
data-utc="{{ password.expires_at.strftime('%Y-%m-%dT%H:%M:%SZ') if password.expires_at }}">
|
||||
{{ password.expires_at }}
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
{% if password.decks %}
|
||||
<ul class="list-disc list-inside text-muted">
|
||||
@@ -202,6 +205,25 @@
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/flowbite@3.1.2/dist/flowbite.min.js"></script>
|
||||
<script>
|
||||
document.querySelectorAll('.local-time').forEach(el => {
|
||||
const utcStr = el.getAttribute('data-utc');
|
||||
if (utcStr) {
|
||||
// Now utcStr is "2026-02-17T02:44:23Z"
|
||||
const date = new Date(utcStr);
|
||||
|
||||
if (!isNaN(date)) {
|
||||
el.textContent = date.toLocaleString('de-DE', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user