mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Fix heatmap total contributions (#14141)
This commit is contained in:
		| @@ -1,7 +1,7 @@ | |||||||
| <template> | <template> | ||||||
|   <div id="user-heatmap"> |   <div id="user-heatmap"> | ||||||
|     <div class="total-contributions"> |     <div class="total-contributions"> | ||||||
|       {{ values.length }} contributions in the last 12 months |       {{ sum }} contributions in the last 12 months | ||||||
|     </div> |     </div> | ||||||
|     <calendar-heatmap |     <calendar-heatmap | ||||||
|       :locale="locale" |       :locale="locale" | ||||||
| @@ -40,6 +40,15 @@ export default { | |||||||
|       no_contributions: 'No contributions', |       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> | </script> | ||||||
| <style scoped/> | <style scoped/> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user