Add sports-match type, device tracking, profile visits, and share refactor
- New SportsMatch model/controller and sports UI components/modal - Move share-modal to a reusable x-share-modal/x-share-button component - Add VideoSharedWithUser notification and share-to-members flow - Device/user-agent tracking on views, downloads, share accesses - ProfileVisit model + migration; subscription source tracking - Email thumbnail support; remove stale TODO files
This commit is contained in:
1 parent
6aae6f86b6
commit
73527f3781
61 files changed
+4014
-636
No files matched your search
@@ -0,0 +1,41 @@
|
||||
@props([
|
||||
'video',
|
||||
'tag' => 'button', // 'button' or 'a'
|
||||
])
|
||||
|
||||
{{-- Canonical share trigger. Opens the single <x-share-modal/> with the full
|
||||
argument set (link, title, tracked-share, email, members) so every share
|
||||
entry point offers the same options. Pass a slot for custom inner content;
|
||||
otherwise it renders a default "Share" label. Extra attributes (class,
|
||||
style, …) are forwarded to the element. --}}
|
||||
@php
|
||||
$auth = auth()->check();
|
||||
$emailUrl = $auth ? route('videos.shareEmail', $video) : '';
|
||||
$membersUrl = $auth ? route('videos.shareMembers', $video) : '';
|
||||
$onclick = sprintf(
|
||||
"openShareModal('%s','%s','%s','%s','%s')",
|
||||
e($video->share_url),
|
||||
addslashes($video->title),
|
||||
route('videos.recordShare', $video),
|
||||
$emailUrl,
|
||||
$membersUrl
|
||||
);
|
||||
@endphp
|
||||
|
||||
@if($tag === 'a')
|
||||
<a href="javascript:void(0)" {{ $attributes }} onclick="{{ $onclick }}">
|
||||
@if($slot->isEmpty())
|
||||
<i class="bi bi-share"></i> Share
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</a>
|
||||
@else
|
||||
<button type="button" {{ $attributes }} onclick="{{ $onclick }}">
|
||||
@if($slot->isEmpty())
|
||||
<i class="bi bi-share"></i> <span>Share</span>
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</button>
|
||||
@endif
|
||||
Reference in new issue
Block a user