mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
update
This commit is contained in:
parent
afc1fb10bc
commit
8004c8d69e
12 changed files with 320 additions and 5 deletions
16
resources/views/livewire/posts/comment.blade.php
Normal file
16
resources/views/livewire/posts/comment.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="wa-flank wa-align-items-start">
|
||||
<wa-avatar initials="" label="{{ $comment->user->name }}"></wa-avatar>
|
||||
<div class="wa-split">
|
||||
<div class="wa-stack wa-gap-3xs">
|
||||
<div class="wa-cluster wa-align-items-center">
|
||||
<strong>{{ $comment->user->name }}</strong>
|
||||
<span class="wa-caption-m" wire:poll.visible>{{ $comment->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
<span>{{ $comment->message }}</span>
|
||||
</div>
|
||||
|
||||
@if (Auth::id() == $comment->user->id)
|
||||
<wa-icon-button href="{{ url("/delete/comment/$comment->id") }}" name="times" label="Delete"></wa-icon-button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -65,8 +65,23 @@
|
|||
</div>
|
||||
|
||||
{{-- Main content --}}
|
||||
<div class="wa-stack wa-gap-2xl" wire:poll>
|
||||
<div class="wa-stack wa-gap-2xl" wire:poll.visible>
|
||||
<livewire:posts.image :$post lazy />
|
||||
|
||||
<span class="wa-heading-m">
|
||||
<wa-format-number value="{{ $post->comments->count() }}"></wa-format-number>
|
||||
{{ Str::plural("Comment", $post->comments->count()) }}
|
||||
</span>
|
||||
|
||||
<form wire:submit="postComment">
|
||||
<wa-input wire:model.live="message" type="text" placeholder="Leave a comment, press enter to post." clearable multiline>
|
||||
<wa-icon name="comment" slot="prefix"></wa-icon>
|
||||
</wa-input>
|
||||
</form>
|
||||
|
||||
@foreach ($comments as $comment)
|
||||
<livewire:posts.comment :$comment :key="$comment->id" />
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue