mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-25 14:35:47 +01:00
Fixes: https://github.com/go-gitea/gitea/issues/21045 - Move heatmap data loading from synchronous server-side rendering to async client-side fetch via dedicated JSON endpoints - Dashboard and user profile pages no longer block on the expensive heatmap DB query during HTML generation - Use compact `[[timestamp,count]]` JSON format instead of `[{"timestamp":N,"contributions":N}]` to reduce payload size - Public API (`/api/v1/users/{username}/heatmap`) remains unchanged - Heatmap rendering is unchanged, still shows a spinner as before, which will now spin a litte bit longer. Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
13 lines
496 B
Handlebars
13 lines
496 B
Handlebars
{{if .EnableHeatmap}}
|
|
<div class="activity-heatmap-container">
|
|
<div id="user-heatmap" class="is-loading"
|
|
data-heatmap-url="{{.HeatmapURL}}"
|
|
data-locale-total-contributions="{{ctx.Locale.Tr "heatmap.number_of_contributions_in_the_last_12_months" "%s"}}"
|
|
data-locale-no-contributions="{{ctx.Locale.Tr "heatmap.no_contributions"}}"
|
|
data-locale-more="{{ctx.Locale.Tr "heatmap.more"}}"
|
|
data-locale-less="{{ctx.Locale.Tr "heatmap.less"}}"
|
|
></div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
{{end}}
|