diff --git a/resources/views/livewire/catalog/index.blade.php b/resources/views/livewire/catalog/index.blade.php index d796d4f..201ee7e 100644 --- a/resources/views/livewire/catalog/index.blade.php +++ b/resources/views/livewire/catalog/index.blade.php @@ -1,6 +1,7 @@ loadCatalogPlugins(); } + public function placeholder() + { + return <<<'HTML' +
+
+
+ + Loading recipes... +
+
+
+ HTML; + } + private function loadCatalogPlugins(): void { $catalogUrl = config('app.catalog_url'); diff --git a/resources/views/livewire/catalog/trmnl.blade.php b/resources/views/livewire/catalog/trmnl.blade.php index 034bf3b..8e9c7af 100644 --- a/resources/views/livewire/catalog/trmnl.blade.php +++ b/resources/views/livewire/catalog/trmnl.blade.php @@ -1,5 +1,6 @@ loadNewest(); } + public function placeholder() + { + return <<<'HTML' +
+
+
+ + Loading recipes... +
+
+
+ HTML; + } + private function loadNewest(): void { try { @@ -87,8 +103,6 @@ new class extends Component { { abort_unless(auth()->user() !== null, 403); - $this->installingPlugin = $recipeId; - try { $zipUrl = "https://usetrmnl.com/api/plugin_settings/{$recipeId}/archive"; @@ -108,8 +122,6 @@ new class extends Component { } catch (\Exception $e) { Log::error('Plugin installation failed: ' . $e->getMessage()); $this->addError('installation', 'Error installing plugin: ' . $e->getMessage()); - } finally { - $this->installingPlugin = ''; } } @@ -199,20 +211,11 @@ new class extends Component {
@if($recipe['id']) - @if($installingPlugin === $recipe['id']) - - - - @else - - Install - - @endif + + Install + @endif @if($recipe['detail_url']) diff --git a/resources/views/livewire/plugins/index.blade.php b/resources/views/livewire/plugins/index.blade.php index 0482068..469365c 100644 --- a/resources/views/livewire/plugins/index.blade.php +++ b/resources/views/livewire/plugins/index.blade.php @@ -286,7 +286,7 @@ new class extends Component { Browse and install Recipes from the community. Add yours here.
- + @@ -300,14 +300,14 @@ new class extends Component { Limitations Please report issues, aside from the known limitations, on GitHub. Include the recipe URL. - +