From 12c2efb45c112baf6013c304c35cbd404f7be21a Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 18 Nov 2020 23:00:16 +0100 Subject: 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 --- web_src/js/components/ActivityHeatmap.vue | 25 ++++++++----------------- web_src/js/features/heatmap.js | 23 +++++++++++++++++++++++ web_src/js/features/userheatmap.js | 10 ---------- web_src/js/index.js | 4 ++-- 4 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 web_src/js/features/heatmap.js delete mode 100644 web_src/js/features/userheatmap.js (limited to 'web_src/js') diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue index 1970cb609a..943bf704e2 100644 --- a/web_src/js/components/ActivityHeatmap.vue +++ b/web_src/js/components/ActivityHeatmap.vue @@ -1,13 +1,9 @@