updated time format

This commit is contained in:
2026-01-23 12:12:50 +01:00
parent 6b49b37e91
commit 6667337236
2 changed files with 19 additions and 9 deletions
+9
View File
@@ -1046,6 +1046,9 @@ data:
"calendar": calendar_name,
"start": occ.isoformat(),
"start_unix": int(occ.timestamp()),
"start_date": occ.strftime("%b %d"),
"start_time": occ.strftime("%H:%M"),
"start_weekday": occ.strftime("%a"),
"end": occ_end.isoformat() if occ_end else None,
"end_unix": int(occ_end.timestamp()) if occ_end else None,
"is_all_day": is_all_day,
@@ -1062,6 +1065,9 @@ data:
"calendar": calendar_name,
"start": dtstart_val.isoformat(),
"start_unix": int(dtstart_val.timestamp()),
"start_date": dtstart_val.strftime("%b %d"),
"start_time": dtstart_val.strftime("%H:%M"),
"start_weekday": dtstart_val.strftime("%a"),
"end": dtend_val.isoformat() if dtend_val else None,
"end_unix": int(dtend_val.timestamp()) if dtend_val else None,
"is_all_day": is_all_day,
@@ -1077,6 +1083,9 @@ data:
"calendar": calendar_name,
"start": dtstart_val.isoformat(),
"start_unix": int(dtstart_val.timestamp()),
"start_date": dtstart_val.strftime("%b %d"),
"start_time": dtstart_val.strftime("%H:%M"),
"start_weekday": dtstart_val.strftime("%a"),
"end": dtend_val.isoformat() if dtend_val else None,
"end_unix": int(dtend_val.timestamp()) if dtend_val else None,
"is_all_day": is_all_day,
+10 -9
View File
@@ -562,7 +562,7 @@ data:
widgets:
# Calendar Events Widget (Órák & Családi)
- type: custom-api
title: Next Events
title: Naptár
cache: 5m
url: http://glance-helper.glance-system.svc.cluster.local:8000/calendar/events
parameters:
@@ -637,20 +637,21 @@ data:
<div class="cal-widget">
<div class="cal-meta">
<span>Next events ({{ $count }})</span>
<span>Következő események ({{ $count }})</span>
</div>
{{ if lt $count 1 }}
<div class="cal-empty">No event in near future.</div>
<div class="cal-empty">Nincs közelgő esemény.</div>
{{ else }}
{{ if $hasMore }}<input type="checkbox" id="cal-expand" style="display:none;">{{ end }}
<div class="cal-list">
{{ range $i, $e := $events }}
{{ $isExtra := ge $i $showCount }}
{{ $start := $e.String "start" }}
{{ $isAllDay := $e.Bool "is_all_day" }}
{{ $calendar := $e.String "calendar" }}
{{ $title := $e.String "title" }}
{{ $startDate := $e.String "start_date" }}
{{ $startTime := $e.String "start_time" }}
<div class="cal-item{{ if $isExtra }} cal-extra cal-hidden{{ end }}">
<div>
@@ -658,19 +659,19 @@ data:
<div class="cal-source">{{ $calendar }}</div>
</div>
<div class="cal-time">
<div class="cal-date">{{ formatTime $start "Jan 2" }}</div>
<div class="cal-date">{{ $startDate }}</div>
{{ if $isAllDay }}
<div class="cal-allday">Whole Day</div>
<div class="cal-allday">Egész nap</div>
{{ else }}
<div class="cal-hour">{{ formatTime $start "15:04" }}</div>
<div class="cal-hour">{{ $startTime }}</div>
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ if $hasMore }}
<label class="cal-toggle cal-toggle-more" for="cal-expand">Show More ({{ sub $count $showCount }} további) ▼</label>
<label class="cal-toggle cal-toggle-less" for="cal-expand">Show Less ▲</label>
<label class="cal-toggle cal-toggle-more" for="cal-expand">Mutass többet ({{ sub $count $showCount }} további) ▼</label>
<label class="cal-toggle cal-toggle-less" for="cal-expand">Mutass kevesebbet ▲</label>
{{ end }}
{{ end }}
</div>