WIP
This commit is contained in:
@@ -8,7 +8,6 @@ use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\On;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
use App\Models\Album;
|
||||
use App\Models\Image;
|
||||
@@ -42,6 +41,11 @@ class Show extends Component
|
||||
$this->redirect(route('album.show', $this->album), navigate: true);
|
||||
}
|
||||
|
||||
#[On('image.makeCover')]
|
||||
public function makeCover(int $image_id):void {
|
||||
Image::findOrFail($image_id)->makeCover();
|
||||
}
|
||||
|
||||
private function dispatchRotateJob(Image $image, int $degrees) : void {
|
||||
$image->update([
|
||||
'isProcessing' => true,
|
||||
@@ -57,9 +61,9 @@ class Show extends Component
|
||||
])->dispatch();
|
||||
}
|
||||
|
||||
#[Title('Show Album')]
|
||||
public function render(): View|Factory
|
||||
{
|
||||
return view('livewire.album.show');
|
||||
return view('livewire.album.show')
|
||||
->title($this->album->name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user