mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-06 12:02:45 +03:00
Comments: Further range of content reference ux improvements
- Added reference indicator to comment create form. - Added remove action. - Extracted reference text to translations. - Changed reference hash to be text-based instead of HTML based. - Added reference display for newly added comments. - Handled reference marker delete on comment delete.
This commit is contained in:
@@ -131,7 +131,16 @@ export class PageComment extends Component {
|
||||
|
||||
await window.$http.delete(`/comment/${this.commentId}`);
|
||||
this.$emit('delete');
|
||||
this.container.closest('.comment-branch')?.remove();
|
||||
|
||||
const branch = this.container.closest('.comment-branch');
|
||||
if (branch instanceof HTMLElement) {
|
||||
const refs = window.$components.allWithinElement<PageCommentReference>(branch, 'page-comment-reference');
|
||||
for (const ref of refs) {
|
||||
ref.hideMarker();
|
||||
}
|
||||
branch.remove();
|
||||
}
|
||||
|
||||
window.$events.success(this.deletedText);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user