Skip to content

Commit

Permalink
Include avatar initials in microblog comment form
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Oct 9, 2024
1 parent 8ab6480 commit 141e3b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Http/Composers/InitialStateComposer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Coyote\Http\Composers;

use Coyote\Domain\Initials;
use Coyote\Services\Forum\UserDefined;
use Coyote\Services\JwtToken;
use Coyote\User;
Expand Down Expand Up @@ -77,6 +78,7 @@ private function registerUserModel(): array
'photo' => (string)$user->photo->url(),
'is_sponsor' => $user->is_sponsor,
'postCommentStyle' => $user->guest->settings['postCommentStyle'] ?? 'legacy',
'initials' => (new Initials)->of($user->name),
],
];
}
Expand Down
7 changes: 6 additions & 1 deletion resources/js/components/microblog/microblog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@
<div class="media microblog-input rounded border-top-0">
<div class="me-2">
<a v-profile="user.id">
<vue-avatar :photo="user.photo" :name="user.name" class="i-35 d-block img-thumbnail"></vue-avatar>
<vue-avatar
:photo="user.photo"
:name="user.name"
:initials="user.initials"
class="i-35 d-block img-thumbnail"
/>
</a>
</div>
<div class="media-body position-relative">
Expand Down

0 comments on commit 141e3b0

Please sign in to comment.