41 lines
2.1 KiB
PHP
41 lines
2.1 KiB
PHP
@php
|
|
$layout = Auth::check() ? 'app-layout' : 'guest-layout';
|
|
@endphp
|
|
|
|
<x-dynamic-component :component="$layout">
|
|
<x-slot name="header">
|
|
{{ __('Chat messenger') }}
|
|
</x-slot>
|
|
|
|
@auth
|
|
@if(userHasMultipleProfiles() && session('activeProfileName'))
|
|
@php
|
|
$photoUrl = session('activeProfilePhoto') ? \Illuminate\Support\Facades\Storage::url(session('activeProfilePhoto')) : null;
|
|
$translatedRole = session('activeProfileRoleLabel') ? __(session('activeProfileRoleLabel')) : null;
|
|
@endphp
|
|
<div style="background-color: #f3f4f6; border-bottom: 1px solid #e5e7eb; padding: 12px 16px;">
|
|
<div style="max-width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 12px;">
|
|
@if($photoUrl)
|
|
<img src="{{ $photoUrl }}" alt="{{ session('activeProfileName') }}" style="width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
|
|
@endif
|
|
<div style="flex: 1;">
|
|
<div style="color: #6b7280; font-size: 12px; margin-bottom: 2px;">{{ __('You are now acting as') }}</div>
|
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
<span style="font-weight: 600; color: #111827; font-size: 14px;">{{ session('activeProfileName') }}</span>
|
|
@if($translatedRole)
|
|
<span style="font-size: 11px; color: #6b7280; background-color: #e5e7eb; padding: 2px 8px; border-radius: 4px;">{{ $translatedRole }}</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endauth
|
|
|
|
<div class="py-6">
|
|
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
|
@livewire('static-post', ['type' => 'SiteContents\Static\Messenger' ?? null, 'limit' => timebank_config('posts.static.press-media.limit'), 'hideAuthor' => timebank_config('posts.static.press-media.limit')])
|
|
</div>
|
|
</div>
|
|
</x-dynamic-layout>
|