mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-27 17:54:23 +00:00
Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" (#36654)
Newbies often use the "Close with Comments" button instead of deleting their comment. Icon should prevent mis-clicks. --------- Co-authored-by: Yuriy.Khlynovskiy <yuriy.khlynovskiy@incomsystem.ru> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
committed by
GitHub
parent
eb59b1a24a
commit
d9ac0636d0
@@ -513,7 +513,8 @@ async function initSingleCommentEditor(commentForm: HTMLFormElement) {
|
||||
const syncUiState = () => {
|
||||
const editorText = editor.value().trim(), isUploading = editor.isUploading();
|
||||
if (statusButton) {
|
||||
statusButton.textContent = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status');
|
||||
const statusText = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status');
|
||||
statusButton.querySelector<HTMLElement>('.status-button-text')!.textContent = statusText;
|
||||
statusButton.disabled = isUploading;
|
||||
}
|
||||
if (commentButton) {
|
||||
|
||||
Reference in New Issue
Block a user