Snapshot of main at 9f39a6e1e (2026-11-02)
This commit is contained in:
commit
6ccf1792d7
2580 files changed
+1040202
No files matched your search
@@ -0,0 +1,174 @@
|
||||
<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>
|
||||
@php
|
||||
$webUser = \Illuminate\Support\Facades\Auth::guard('web')->user();
|
||||
$activeLogId = session('activeProfileId');
|
||||
$adminLogPermissions = [];
|
||||
if ($webUser && $activeLogId) {
|
||||
$logPrefix = 'Admin\\' . $activeLogId . '\\';
|
||||
$logScopedRoles = $webUser->roles->filter(fn($r) => str_starts_with($r->name, $logPrefix));
|
||||
foreach ($logScopedRoles as $logScopedRole) {
|
||||
$logRoleName = str_replace($logPrefix, '', $logScopedRole->name);
|
||||
$logAdminRole = \App\Models\AdminRole::where('name', $logRoleName)->first();
|
||||
if ($logAdminRole) {
|
||||
$adminLogPermissions = array_merge($adminLogPermissions, $logAdminRole->permissions ?? []);
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
@if (in_array('view search-metrics', $adminLogPermissions) && timebank_config('search_optimization.search_analytics_enabled'))
|
||||
<livewire:admin.search-metrics />
|
||||
@endif
|
||||
@if (in_array('view application-log', $adminLogPermissions))
|
||||
<div class="py-6"></div>
|
||||
<livewire:admin.log/>
|
||||
@endif
|
||||
@if (in_array('view inactive-profiles-log', $adminLogPermissions))
|
||||
<div class="py-6"></div>
|
||||
<livewire:admin.log-viewer
|
||||
log-filename="inactive-profiles.log"
|
||||
log-title="{{ __('Inactive Profile Processing Log') }}" />
|
||||
@endif
|
||||
@if (in_array('view search-reindex-log', $adminLogPermissions))
|
||||
<div class="py-6"></div>
|
||||
<livewire:admin.log-viewer
|
||||
log-filename="scout-reindex.log"
|
||||
log-title="{{ __('Search Reindex Log') }}" />
|
||||
@endif
|
||||
</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
|
||||
|
||||
|
||||
<!-- Poll: first open poll for this profile that it has not answered yet -->
|
||||
<livewire:main-page.poll-card-full />
|
||||
|
||||
<!-- 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' || session('activeProfileType') === 'App\Models\Organization' || session('activeProfileType') === 'App\Models\Bank')
|
||||
<livewire:online-reacted-profiles
|
||||
: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>
|
||||
Reference in new issue
Block a user