mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Use "small-loading-icon" insead of "btn-octicon is-loading" (#26710)
The "btn-octicon is-loading" was introduced by #21842 , it is only used by the "Copy Content" button, but the "btn-octicon" selector would affect too many uncertain elements. Now there is a general "small-loading-icon" class, so the "btn-octicon is-loading" could be removed.
This commit is contained in:
		| @@ -18,7 +18,7 @@ export function initCopyContent() { | ||||
|     // the text to copy is not in the DOM or it is an image which should be | ||||
|     // fetched to copy in full resolution | ||||
|     if (link) { | ||||
|       btn.classList.add('is-loading'); | ||||
|       btn.classList.add('is-loading', 'small-loading-icon'); | ||||
|       try { | ||||
|         const res = await fetch(link, {credentials: 'include', redirect: 'follow'}); | ||||
|         const contentType = res.headers.get('content-type'); | ||||
| @@ -32,7 +32,7 @@ export function initCopyContent() { | ||||
|       } catch { | ||||
|         return showTemporaryTooltip(btn, i18n.copy_error); | ||||
|       } finally { | ||||
|         btn.classList.remove('is-loading'); | ||||
|         btn.classList.remove('is-loading', 'small-loading-icon'); | ||||
|       } | ||||
|     } else { // text, read from DOM | ||||
|       const lineEls = document.querySelectorAll('.file-view .lines-code'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user