Skip to content

Commit

Permalink
fix: display activity chart when running under subpath (resolve #594)
Browse files Browse the repository at this point in the history
  • Loading branch information
muety committed Jan 12, 2024
1 parent 14a3d2c commit fa2dce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion static/assets/js/components/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PetiteVue.createApp({
return null
},
mounted({userId}) {
fetch(`/api/activity/chart/${userId}.svg?dark&noattr`)
fetch(`api/activity/chart/${userId}.svg?dark&noattr`)
.then(res => res.text())
.then(data => this.activityChartSvg = data)
}
Expand Down
2 changes: 1 addition & 1 deletion views/summary.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h4 class="font-semibold text-lg text-gray-500">{{ .TotalTime | duration }}</h4>
<div class="mt-12 flex flex-col space-y-2 text-gray-300 w-full">
<div class="flex justify-start space-x-2 items-center">
<h2 class="text-lg font-semibold">Activity</h2>
<a v-cloak v-show="activityChartSvg" href="/api/activity/chart/{{ .User.ID }}.svg" target="_blank" rel="noreferrer noopener" class="p-1 rounded hover:bg-gray-850" title="Share...">
<a v-cloak v-show="activityChartSvg" href="api/activity/chart/{{ .User.ID }}.svg" target="_blank" rel="noreferrer noopener" class="p-1 rounded hover:bg-gray-850" title="Share...">
<span class="iconify inline text-xl text-gray-500 p-px" data-icon="octicon:share-16"></span>
</a>
</div>
Expand Down

0 comments on commit fa2dce0

Please sign in to comment.