File tree Expand file tree Collapse file tree 6 files changed +74
-2
lines changed
resources/views/components/cms/livewire Expand file tree Collapse file tree 6 files changed +74
-2
lines changed Original file line number Diff line number Diff line change 1+ @props ([
2+ ' model' => null ,
3+ ' old' => null ,
4+ ] )
5+
6+
7+ <div class =" mb-3" >
8+ @if ($model instanceof \Livewire\Features\SupportFileUploads\ TemporaryUploadedFile )
9+ <audio controls >
10+ <source src =" {{ $model -> temporaryUrl () } }" type =" audio/mpeg" >
11+ Your browser does not support the audio element.
12+ </audio >
13+ @elseif ($old != null )
14+ <audio controls >
15+ <source src =" {{ $old } }" type =" audio/mpeg" >
16+ Your browser does not support the audio element.
17+ </audio >
18+ @endif
19+ </div >
Original file line number Diff line number Diff line change 1+ @props ([
2+ ' model' => null ,
3+ ' old' => null ,
4+ ' icon' => ' fa-file-pdf' ,
5+ ' label' => ' View PDF' ,
6+ ] )
7+
8+ <div class =" mb-3" >
9+ @if ($model instanceof \Livewire\Features\SupportFileUploads\ TemporaryUploadedFile )
10+ <a href =" {{ $model -> temporaryUrl () } }" target =" _blank" class =" btn btn-primary" >
11+ <i class =" fa-solid {{ $icon } }" ></i > {{ $label } }
12+ </a >
13+ @elseif ($old != null )
14+ <a href =" {{ $old } }" target =" _blank" class =" btn btn-primary" >
15+ <i class =" fa-solid {{ $icon } }" ></i > {{ $label } }
16+ </a >
17+ @endif
18+ </div >
Original file line number Diff line number Diff line change 1+ @props ([
2+ ' model' => null ,
3+ ' old' => null ,
4+ ] )
5+
6+ <div class =" mb-3" >
7+ @if ($model instanceof \Livewire\Features\SupportFileUploads\ TemporaryUploadedFile )
8+ <img src =" {{ $model -> temporaryUrl () } }" alt =" logo" class =" img-fluid" >
9+ @elseif ($old != null )
10+ <img src =" {{ $old } }" alt =" logo" class =" img-fluid" >
11+ @endif
12+ </div >
Original file line number Diff line number Diff line change 33 ' class' => ' form-control' ,
44 ' imageIttr' => 1 ,
55] )
6- <x-acc- upload-progress >
6+ <x-cms .livewire. upload-progress >
77 <input type =" file" wire:model =" {{ $model } }" class =" {{ $class } }" id =" {{ $imageIttr } }" {{ $attributes ?? ' ' } } >
8- </x-acc- upload-progress >
8+ </x-cms .livewire. upload-progress >
99<x-acc-input-error for =" {{ $model } }" />
Original file line number Diff line number Diff line change 1+ <div x-data =" { uploading: false, progress: 0 }"
2+ x-on:livewire-upload-start =" uploading = true"
3+ x-on:livewire-upload-finish =" uploading = false"
4+ x-on:livewire-upload-cancel =" uploading = false"
5+ x-on:livewire-upload-error =" uploading = false"
6+ x-on:livewire-upload-progress =" progress = $event.detail.progress" >
7+ {{ $slot ?? ' ' } }
8+ <div x-show =" uploading" >
9+ <progress max =" 100" x-bind:value =" progress" ></progress >
10+ </div >
11+ </div >
Original file line number Diff line number Diff line change 1+ @props ([
2+ ' model' => null ,
3+ ' old' => null ,
4+ ] )
5+
6+ <div class =" mb-3" >
7+ @if ($model instanceof \Livewire\Features\SupportFileUploads\ TemporaryUploadedFile )
8+ <video src =" {{ $model -> temporaryUrl () } }" alt =" logo" class =" img-fluid" controls ></video >
9+ @elseif ($old !== null )
10+ <video src =" {{ $old } }" alt =" logo" class =" img-fluid" controls ></video >
11+ @endif
12+ </div >
You can’t perform that action at this time.
0 commit comments