1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 13:29:12 -05:00

Fix heatmap total contributions (#14141)

This commit is contained in:
Lunny Xiao 2020-12-25 04:58:30 +08:00 committed by GitHub
parent 5a94db37ed
commit 2c8d302eb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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/>