mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-16 16:37:47 +00:00
refactor: upgrade to Livewire 4
This commit is contained in:
parent
c94dd89361
commit
a15645ad88
56 changed files with 166 additions and 278 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Plugin;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Plugin;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
|
||||
new class extends Component {
|
||||
public Plugin $plugin;
|
||||
|
|
@ -17,7 +17,7 @@ new class extends Component {
|
|||
{
|
||||
abort_unless(auth()->user()->plugins->contains($this->plugin), 403);
|
||||
abort_unless($this->plugin->plugin_type === 'image_webhook', 404);
|
||||
|
||||
|
||||
$this->name = $this->plugin->name;
|
||||
}
|
||||
|
||||
|
|
@ -272,11 +272,11 @@ new class extends Component {
|
|||
copyable
|
||||
/>
|
||||
<flux:description class="mt-2">POST an image (PNG or BMP) to this URL to update the displayed image.</flux:description>
|
||||
|
||||
|
||||
<flux:callout variant="warning" icon="exclamation-circle" class="mt-4">
|
||||
<flux:callout.text>Images must be posted in a format that can directly be read by the device. You need to take care of image format, dithering, and bit-depth. Check device logs if the image is not shown.</flux:callout.text>
|
||||
</flux:callout>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Plugin;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
new class extends Component {
|
||||
|
|
@ -50,7 +50,7 @@ new class extends Component {
|
|||
public function deleteInstance(int $pluginId): void
|
||||
{
|
||||
abort_unless(auth()->user() !== null, 403);
|
||||
|
||||
|
||||
$plugin = Plugin::where('id', $pluginId)
|
||||
->where('user_id', auth()->id())
|
||||
->where('plugin_type', 'image_webhook')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use App\Console\Commands\ExampleRecipesSeederCommand;
|
||||
use App\Services\PluginImportService;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use App\Jobs\GenerateScreenJob;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
|
||||
new class extends Component {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use App\Models\Plugin;
|
|||
use App\Models\DeviceModel;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Keepsuit\Liquid\Exceptions\LiquidException;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use App\Models\Plugin;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\Component;
|
||||
|
||||
/*
|
||||
* This component contains the TRMNL Plugin Settings modal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue