This commit is contained in:
2026-05-26 21:49:16 +02:00
parent cfd446597d
commit 25dfa6c8a2
2 changed files with 25 additions and 4 deletions

View File

@@ -2352,12 +2352,33 @@ body.layout-modern .item-sidebar-left .tag-controls {
position: relative; position: relative;
} }
.submit-comment .submit-spinner {
display: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
.submit-comment .submit-label {
display: inline;
}
.submit-comment.loading { .submit-comment.loading {
pointer-events: none; pointer-events: none;
opacity: 0.7; opacity: 0.7;
cursor: wait; cursor: wait;
} }
.submit-comment.loading .submit-label {
visibility: hidden;
}
.submit-comment.loading .submit-spinner {
display: inline;
}
.submit-comment.uploading { .submit-comment.uploading {
pointer-events: none; pointer-events: none;
opacity: 0.5; opacity: 0.5;
@@ -3150,7 +3171,7 @@ body.layout-legacy .scroll-to-bottom svg {
} }
} }
.loading, .loading:not(.submit-comment),
.error { .error {
text-align: center; text-align: center;
color: #888; color: #888;
@@ -7637,7 +7658,7 @@ video.autoplay-gif {
margin-bottom: 10px; margin-bottom: 10px;
} }
.loading, .loading:not(.submit-comment),
.error { .error {
text-align: center; text-align: center;
padding: 20px; padding: 20px;

View File

@@ -2116,7 +2116,7 @@ class CommentSystem {
${counter} ${counter}
${attachBtn} ${attachBtn}
${parentId ? `<button class="cancel-reply" title="${cancelLabel}"><i class="fa-solid fa-xmark"></i></button>` : ''} ${parentId ? `<button class="cancel-reply" title="${cancelLabel}"><i class="fa-solid fa-xmark"></i></button>` : ''}
<button class="submit-comment"><span class="submit-label">${postLabel}</span></button> <button class="submit-comment"><span class="submit-label">${postLabel}</span><i class="fa-solid fa-spinner fa-spin submit-spinner"></i></button>
</div> </div>
</div> </div>
`; `;
@@ -2476,7 +2476,7 @@ class CommentSystem {
} }
// Submit Comment // Submit Comment
if (target.matches('.submit-comment')) { if (target.closest('.submit-comment')) {
this.handleSubmit(e); this.handleSubmit(e);
return; return;
} }