diff options
| author | winter | 2025-01-26 21:53:26 +0000 |
|---|---|---|
| committer | winter | 2025-01-26 21:53:26 +0000 |
| commit | 6b58bf53e312a67119289b894c5b482d057e5665 (patch) | |
| tree | fef168089a75d73353af1a79456e711c72385ca3 /templates/reply_form.php | |
| parent | 7d3f35b1895dd3fe08af0f5fe403ff339acd2456 (diff) | |
make mentions work properly + ui for them
Diffstat (limited to 'templates/reply_form.php')
| -rw-r--r-- | templates/reply_form.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/reply_form.php b/templates/reply_form.php index 3434472..57a0dd0 100644 --- a/templates/reply_form.php +++ b/templates/reply_form.php @@ -1,3 +1,8 @@ +<?php +use Digitigrade\Model\UserAccount; + +$user = UserAccount::findByCurrentSession(); +?> <form class="noteReplyForm" id="replyForm-<?= $note->id ?>" _="on submit send toggle to previous <button.reply/> then wait 1s then trigger update on #liveTimelineUpdater on toggle or submit toggle @hidden" hidden hx-post="/fragment/note/<?= $note->id ?>/reply" hx-disabled-elt="find button" hx-swap="outerHTML"> @@ -11,6 +16,15 @@ value="<?= $note->summary ? "re: $note->summary" : '' ?>"> </div> <div class="row"> + <label class="standalone"><?= __('writeNote.mentions.label') ?></label> + <?php foreach (array_merge($note->mentions, [$note->author]) as $m) { + if ($m != $user?->actor) { + call_template('user_mention_pill', ['type' => 'user', 'actor' => $m]); + } + } ?> + <?php call_template('user_mention_pill'); ?> + </div> + <div class="row"> <button class="primary"><?= __('writeReply.action') ?></button> </div> </form>
\ No newline at end of file |
