mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-24 22:51:23 +08:00
Comments: Further range of content reference ux improvements
Some checks failed
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
analyse-php / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
Some checks failed
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
analyse-php / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
- 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