update reply cancel button with less clutter
This commit is contained in:
@@ -1917,7 +1917,7 @@ class CommentSystem {
|
|||||||
<textarea placeholder="${placeholder}"${maxLenAttr}></textarea>
|
<textarea placeholder="${placeholder}"${maxLenAttr}></textarea>
|
||||||
<div class="input-actions">
|
<div class="input-actions">
|
||||||
${counter}
|
${counter}
|
||||||
${parentId ? `<button class="cancel-reply">${cancelLabel}</button>` : ''}
|
${parentId ? `<button class="cancel-reply" title="${cancelLabel}"><i class="fa-solid fa-xmark"></i></button>` : ''}
|
||||||
<button class="submit-comment">${postLabel}</button>
|
<button class="submit-comment">${postLabel}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2244,7 +2244,7 @@ class CommentSystem {
|
|||||||
contentEl.innerHTML = `
|
contentEl.innerHTML = `
|
||||||
<textarea class="edit-textarea">${currentContent}</textarea>
|
<textarea class="edit-textarea">${currentContent}</textarea>
|
||||||
<div class="input-actions">
|
<div class="input-actions">
|
||||||
<button class="cancel-edit-btn">Cancel</button>
|
<button class="cancel-edit-btn" title="Cancel"><i class="fa-solid fa-comment-slash"></i></button>
|
||||||
<button class="save-edit-btn">Save</button>
|
<button class="save-edit-btn">Save</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -3052,8 +3052,11 @@ class CommentSystem {
|
|||||||
}
|
}
|
||||||
textarea.focus();
|
textarea.focus();
|
||||||
});
|
});
|
||||||
const submitBtn = actions.querySelector('.submit-comment');
|
const referenceNode = actions.querySelector('.cancel-reply') ||
|
||||||
actions.insertBefore(trigger, submitBtn);
|
actions.querySelector('.cancel-edit-btn') ||
|
||||||
|
actions.querySelector('.submit-comment') ||
|
||||||
|
actions.querySelector('.save-edit-btn');
|
||||||
|
actions.insertBefore(trigger, referenceNode);
|
||||||
actions.insertBefore(spoilerBtn, trigger);
|
actions.insertBefore(spoilerBtn, trigger);
|
||||||
if (this.isAdmin) {
|
if (this.isAdmin) {
|
||||||
const lockBtn = document.createElement('button');
|
const lockBtn = document.createElement('button');
|
||||||
|
|||||||
Reference in New Issue
Block a user