]> source.dussan.org Git - gitea.git/commit
Remove fetch request from heatmap (#13623)
authorsilverwind <me@silverwind.io>
Wed, 18 Nov 2020 22:00:16 +0000 (23:00 +0100)
committerGitHub <noreply@github.com>
Wed, 18 Nov 2020 22:00:16 +0000 (16:00 -0600)
commit12c2efb45c112baf6013c304c35cbd404f7be21a
tree2deb1fd0a4c09b048c9e4f262057bfe4cfa774b1
parentd02c3508e629d854d0094f4562c4cdebfada5962
Remove fetch request from heatmap (#13623)

* Remove fetch request from heatmap

Render heatmap data directly to HTML, eliminating one HTTP request on
frontpage and user profile. Also added min-height to the container so
the page content will no longer move after loading.

* rename and error display

* also log the js error

* add error handler

* remove useless inline style and hide divider on small screens

* Update routers/user/home.go

* Update routers/user/profile.go
12 files changed:
routers/user/home.go
routers/user/profile.go
templates/base/head.tmpl
templates/user/dashboard/dashboard.tmpl
templates/user/dashboard/heatmap.tmpl [deleted file]
templates/user/heatmap.tmpl [new file with mode: 0644]
templates/user/profile.tmpl
web_src/js/components/ActivityHeatmap.vue
web_src/js/features/heatmap.js [new file with mode: 0644]
web_src/js/features/userheatmap.js [deleted file]
web_src/js/index.js
web_src/less/features/heatmap.less