mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: auto mention when reply
This commit is contained in:
1 parent
9a1d39a693
commit
1ddde7d090
3 files changed
+7
-7
No files matched your search
@@ -109,14 +109,14 @@ async function onCommentClickReplyComment(ev, options = {}) {
|
||||
async function onCommentClickReplyReply(ev) {
|
||||
const $evTarget = $(ev.currentTarget);
|
||||
const $mediaBody = $evTarget.closest('.media__body');
|
||||
const username = $mediaBody
|
||||
.find('.user-profile-name').eq(0)
|
||||
.text();
|
||||
const uid = $mediaBody
|
||||
.find('.user-profile-name')
|
||||
.attr('href').split('/user/')[1];
|
||||
|
||||
$evTarget
|
||||
.closest('.dczcomments__item')
|
||||
.find('[name="dczcomments__op-reply-comment"]').eq(0)
|
||||
.trigger('click', { initialText: `@${username.trim()}: ` });
|
||||
.trigger('click', { initialText: `@[](/user/${uid.trim()}) ` });
|
||||
}
|
||||
|
||||
async function onCommentClickEdit(mode, ev) {
|
||||
|
||||
Reference in new issue
Block a user