160 lines
6.6 KiB
PHP
160 lines
6.6 KiB
PHP
<div wire:key="dashboard-component">
|
|
<!-- Admin Section - Always visible for Admin profiles -->
|
|
@if (getActiveProfileType() === 'Admin')
|
|
@profile('admin')
|
|
<div class="bg-theme-background p-6 sm:px-20">
|
|
@if ($lastLoginAt)
|
|
<div class="flex flex-col gap-2">
|
|
<div class="text-2xs text-theme-light text-right">
|
|
{{ __('Previous login') . ': ' . $lastLoginAt }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
<div class="text-xs text-theme-secondary">
|
|
<div class="py-3"></div>
|
|
<!-- Show online users for default guard -->
|
|
<livewire:online-reacted-profiles
|
|
:guards="['web', 'organization', 'bank', 'admin']"
|
|
:header="true"
|
|
:refresh-interval="10"
|
|
/>
|
|
<div class="py-3"></div>
|
|
<livewire:admin.log/>
|
|
<div class="py-6"></div>
|
|
<livewire:admin.log-viewer
|
|
log-filename="inactive-profiles.log"
|
|
log-title="{{ __('Inactive Profile Processing Log') }}" />
|
|
<div class="py-6"></div>
|
|
<livewire:admin.log-viewer
|
|
log-filename="scout-reindex.log"
|
|
log-title="{{ __('Search Reindex Log') }}" />
|
|
</div>
|
|
</div>
|
|
@endprofile
|
|
@else
|
|
<!-- Non-Admin Section -->
|
|
<div class="bg-theme-background p-6 sm:px-20">
|
|
@if ($lastLoginAt)
|
|
<div class="flex flex-col gap-2">
|
|
<div class="text-2xs text-theme-light text-right">
|
|
{{ __('Previous login') . ': ' . $lastLoginAt }}
|
|
</div>
|
|
</div>
|
|
<div class="text-xs text-theme-secondary">
|
|
<div>
|
|
@livewire('main-post', [
|
|
'type' => $profileType ? 'SiteContents\Welcome\Login\\' . $profileType : null,
|
|
'latest' => true,
|
|
'fallbackTitle' => __(''),
|
|
'fallbackDescription' => __('')
|
|
])
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="my-3 md:my-12">
|
|
@livewire('main-post', [
|
|
'type' => $profileType ? 'SiteContents\Welcome\Login\\' . $profileType . '\\New' : null,
|
|
'latest' => true,
|
|
'fallbackTitle' => __('Welcome new ' . platform_user() . '!'),
|
|
'fallbackDescription' => __('')
|
|
])
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
|
|
<!-- Call carousel -->
|
|
<div class="bg-theme-background py-4">
|
|
<livewire:main-page.call-card-carousel :related="true" :random="false" />
|
|
</div>
|
|
|
|
|
|
<!-- Search -->
|
|
<div class="border-b border-theme-primary bg-theme-background p-3 sm:px-20">
|
|
<div class="mt-6 mb-3 grid grid-cols-1">
|
|
<div class="mx-auto pb-6">
|
|
<x-jetstream.application-mark class="h-12 md:h-20 xl:h-28 w-auto -mt-6 md:mt-0" />
|
|
</div>
|
|
<div class="max-w-[20rem] w-full mx-auto">
|
|
<livewire:main-search-bar />
|
|
</div>
|
|
<div class="mx-auto text-center pt-2 pb-3 text-2xs text-theme-secondary">
|
|
{{ __('Find profiles, skills, events and more...')}}
|
|
<button
|
|
wire:click="$dispatch('openSearchInfoModal')"
|
|
class="ml-1 hover:text-theme-accent underline cursor-pointer">
|
|
{{ __('info') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Category Browser -->
|
|
<div class="lg:col-span-2">
|
|
<div class="mx-auto mb-8">
|
|
<livewire:main-browse-tag-categories />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Online users -->
|
|
<div class="bg-theme-background p-3 sm:px-20">
|
|
@if(timebank_config('online.contact_list.dashboard.enabled'))
|
|
@if (session('activeProfileType') === 'App\Models\User')
|
|
<livewire:online-reacted-profiles
|
|
:reactionTypes="timebank_config('online.contact_list.dashboard.reaction_types_for_user')"
|
|
:guards="['web', 'organization', 'bank']"
|
|
:header="true"
|
|
:refresh-interval="10"
|
|
/>
|
|
@elseif (session('activeProfileType') === 'App\Models\Organization')
|
|
<livewire:online-reacted-profiles
|
|
:reactionTypes="timebank_config('online.contact_list.dashboard.reaction_types_for_organization')"
|
|
:guards="['web', 'organization', 'bank']"
|
|
:header="true"
|
|
:refresh-interval="10"
|
|
/>
|
|
@elseif (session('activeProfileType') === 'App\Models\Bank')
|
|
<livewire:online-reacted-profiles
|
|
:reactionTypes="timebank_config('online.contact_list.dashboard.reaction_types_for_bank')"
|
|
:guards="['web', 'organization', 'bank']"
|
|
:header="true"
|
|
:refresh-interval="10"
|
|
/>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
<div class="border-b border-theme-primary bg-theme-background pb-3 pt-0 sm:px-20"></div>
|
|
|
|
|
|
<!-- Skills --->
|
|
@if (session('activeProfileType') !== 'App\Models\Admin')
|
|
<div class="border-b border-theme-primary bg-theme-background p-6 sm:px-20">
|
|
@include('post-header', ['title' => __('Update your skills')])
|
|
<div class="my-6">
|
|
<livewire:main-page.skills-card-full />
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
|
|
|
|
{{-- Mark postNr = 1 to view 2nd latest post or the 2nd upcoming event --}}
|
|
{{-- Mark related as 1 to view also for users / organizations in related locations --}}
|
|
<livewire:main-page.event-card-full :postNr=0 :related=1>
|
|
<livewire:main-page.news-card-full :postNr=0 :related=1>
|
|
<livewire:main-page.event-card-full :postNr=1 :related=0>
|
|
<livewire:main-page.news-card-full :postNr=1 :related=0>
|
|
<livewire:main-page.article-card-full :postNr=0 :related=1>
|
|
<livewire:main-page.call-card-half :related="false" :random="true" :rows="2" />
|
|
<livewire:main-page.article-card-full :postNr=1 :related=0>
|
|
|
|
<div class="bg-theme-secondary -my-9"></div>
|
|
|
|
|
|
<!-- Search Info Modal -->
|
|
<livewire:search-info-modal />
|
|
|
|
</div> |