mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Render diff stats server-side (#13579)
Eliminates a flash on page load on the diff stat bars.
This commit is contained in:
		| @@ -1134,17 +1134,6 @@ async function initRepository() { | ||||
|     initReactionSelector(); | ||||
|   } | ||||
|  | ||||
|   // Diff | ||||
|   if ($('.repository.diff').length > 0) { | ||||
|     $('.diff-counter').each(function () { | ||||
|       const $item = $(this); | ||||
|       const addLine = $item.find('span[data-line].add').data('line'); | ||||
|       const delLine = $item.find('span[data-line].del').data('line'); | ||||
|       const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100; | ||||
|       $item.find('.bar .add').css('width', `${addPercent}%`); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   // Quick start and repository home | ||||
|   $('#repo-clone-ssh').on('click', function () { | ||||
|     $('.clone-url').text($(this).data('link')); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user