Skip to content

Commit b326a87

Browse files
authored
Merge pull request #4424 from clandestine8/add-torrent-comments-quoting
2 parents afefc66 + e4001cb commit b326a87

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

resources/views/livewire/comment.blade.php

+21
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@ class="comment__datetime"
2020
</li>
2121
@endif
2222

23+
<li class="comment__toolbar-item">
24+
<button
25+
class="post__quote"
26+
title="{{ __('forum.quote') }}"
27+
x-on:click="
28+
input = document.getElementById(
29+
'{{ $comment->isParent() ? 'new-comment__textarea' : 'reply-comment' }}'
30+
);
31+
input.value +=
32+
'[quote={{ \htmlspecialchars($comment->anon ? 'Anonymous' : '@' . $comment->user->username) }}]';
33+
input.value += decodeURIComponent(
34+
escape(atob('{{ base64_encode(\htmlspecialchars($comment->content)) }}'))
35+
);
36+
input.value += '[/quote]';
37+
input.dispatchEvent(new Event('input'));
38+
input.focus();
39+
"
40+
>
41+
<i class="{{ \config('other.font-awesome') }} fa-quote-left"></i>
42+
</button>
43+
</li>
2344
@if ($comment->user_id === auth()->id() || auth()->user()->group->is_modo)
2445
<li class="comment__toolbar-item">
2546
<button wire:click="$toggle('isEditing')" class="comment__edit">

0 commit comments

Comments
 (0)