Show visibility of statuses

Added an icon to show the visibility of a status (public, unlisted,
private, or direct). This goes next to the up arrow indicating
a reply, so this area can be used for other symbols regarding the
status' properties.
This commit is contained in:
St John Karp 2018-10-08 06:38:16 -07:00
parent c0e7838308
commit c3e6b50f37
3 changed files with 34 additions and 17 deletions

View File

@ -71,7 +71,7 @@ div.actions span.reblogged a {
color: green; color: green;
} }
time, span.event-action { time, span.event-indicators {
font-size: smaller; font-size: smaller;
margin-left: 1em; margin-left: 1em;
} }

View File

@ -10,21 +10,37 @@
</a> </a>
</span> </span>
@if ($type !== null) <span class="event-indicators">
<span class="event-action"> @if ($visibility !== null)
@if ($type === 'mention') <span class="visibility">
mentioned @if ($visibility === 'public')
@elseif ($type === 'reblog') <span title="public">&#9675;</span>
reblogged @elseif ($visibility === 'unlisted')
@elseif ($type === 'favourite') <span title="unlisted">&#9676;</span>
favourited @elseif ($visibility === 'private')
@elseif ($type === 'follow') <span title="private">&#128274;</span>
followed you. @elseif ($visibility === 'direct')
@elseif ($type === 'reply') <span title="direct">&#9993;</span>
&#8624; @endif
@endif </span>
</span> @endif
@endif
@if ($type !== null)
<span class="event-action">
@if ($type === 'mention')
mentioned
@elseif ($type === 'reblog')
reblogged
@elseif ($type === 'favourite')
favourited
@elseif ($type === 'follow')
followed you.
@elseif ($type === 'reply')
&#8624;
@endif
</span>
@endif
</span>
<time datetime="{{ $created_at }}"> <time datetime="{{ $created_at }}">
@php @php

View File

@ -2,7 +2,8 @@
@component('event_info', [ @component('event_info', [
'account' => $status['account'], 'account' => $status['account'],
'created_at' => $status['created_at'], 'created_at' => $status['created_at'],
'type' => $status['in_reply_to_id'] === null ? null : 'reply' 'type' => $status['in_reply_to_id'] === null ? null : 'reply',
'visibility' => $status['visibility']
]) ])
@endcomponent @endcomponent