aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-12-25 04:58:30 +0800
committerGitHub <noreply@github.com>2020-12-24 20:58:30 +0000
commit2c8d302eb17e330624dad5f6cf1bcbf5ccf4917d (patch)
treee92546d28c5330b76c2f5c4f6d06640aff719770 /web_src
parent5a94db37ed16b253bf6e43ae6337f3a3c21f6d70 (diff)
downloadgitea-2c8d302eb17e330624dad5f6cf1bcbf5ccf4917d.tar.gz
gitea-2c8d302eb17e330624dad5f6cf1bcbf5ccf4917d.zip
Fix heatmap total contributions (#14141)
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/components/ActivityHeatmap.vue11
1 files changed, 10 insertions, 1 deletions
diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue
index 943bf704e2..7eb129d139 100644
--- a/web_src/js/components/ActivityHeatmap.vue
+++ b/web_src/js/components/ActivityHeatmap.vue
@@ -1,7 +1,7 @@
<template>
<div id="user-heatmap">
<div class="total-contributions">
- {{ values.length }} contributions in the last 12 months
+ {{ sum }} contributions in the last 12 months
</div>
<calendar-heatmap
:locale="locale"
@@ -40,6 +40,15 @@ export default {
no_contributions: 'No contributions',
},
}),
+ computed: {
+ sum() {
+ let s = 0;
+ for (let i = 0; i < this.values.length; i++) {
+ s += this.values[i].count;
+ }
+ return s;
+ }
+ }
};
</script>
<style scoped/>