From 00fc526371d2601bae9054df2432281f9724ba79 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Mon, 22 Sep 2025 11:49:30 +0200 Subject: [PATCH 1/3] fix: replace 'x-trmnl::markdown' with 'x-trmnl::richtex' as markdown was removed in Framework v2 --- resources/views/livewire/plugins/markup.blade.php | 8 ++++---- resources/views/trmnl.blade.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/livewire/plugins/markup.blade.php b/resources/views/livewire/plugins/markup.blade.php index 4cea323..cb7823e 100644 --- a/resources/views/livewire/plugins/markup.blade.php +++ b/resources/views/livewire/plugins/markup.blade.php @@ -70,11 +70,11 @@ new class extends Component { - + TRMNL BYOS Laravel “This screen was rendered by BYOS Laravel” Benjamin Nussbaum - + @@ -88,11 +88,11 @@ HTML; - + Motivational Quote “I love inside jokes. I hope to be a part of one someday.” Michael Scott - + diff --git a/resources/views/trmnl.blade.php b/resources/views/trmnl.blade.php index bcfd3b5..9f49685 100644 --- a/resources/views/trmnl.blade.php +++ b/resources/views/trmnl.blade.php @@ -1,10 +1,10 @@ - + Motivational Quote “I love inside jokes. I hope to be a part of one someday.” Michael Scott - + From 2d76afee6f03fee3e5d84f9b4b92b89b58e9efa8 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Mon, 22 Sep 2025 11:49:52 +0200 Subject: [PATCH 2/3] ci: update Test Action to PHP 8.4 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd03705..78e4fbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 coverage: xdebug - name: Setup Node From 8958e65ec205963787c46df1bd1eb01f45ba202e Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Mon, 22 Sep 2025 12:04:33 +0200 Subject: [PATCH 3/3] chore: pint --- app/Models/DeviceModel.php | 4 +-- app/Models/Plugin.php | 17 +++++----- app/Services/PluginImportService.php | 46 ++++++++++++++-------------- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/app/Models/DeviceModel.php b/app/Models/DeviceModel.php index 18750ea..0d3757b 100644 --- a/app/Models/DeviceModel.php +++ b/app/Models/DeviceModel.php @@ -31,7 +31,7 @@ final class DeviceModel extends Model return null; } - //if higher then 4 return 4bit + // if higher then 4 return 4bit if ($this->bit_depth > 4) { return '4bit'; } @@ -39,7 +39,7 @@ final class DeviceModel extends Model return $this->bit_depth.'bit'; } -/** + /** * Returns the scale level based on the device width. */ public function getScaleLevelAttribute(): ?string diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index 7c6d2c1..f5f6928 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -350,15 +350,16 @@ class Plugin extends Model 'scaleLevel' => $device?->deviceModel?->scale_level, 'slot' => $renderedContent, ])->render(); - } else { - return view('trmnl-layouts.mashup', [ - 'mashupLayout' => $this->getPreviewMashupLayoutForSize($size), - 'colorDepth' => $device?->deviceModel?->color_depth, - 'deviceVariant' => $device?->deviceModel->name ?? 'og', - 'scaleLevel' => $device?->deviceModel?->scale_level, - 'slot' => $renderedContent, - ])->render(); } + + return view('trmnl-layouts.mashup', [ + 'mashupLayout' => $this->getPreviewMashupLayoutForSize($size), + 'colorDepth' => $device?->deviceModel?->color_depth, + 'deviceVariant' => $device?->deviceModel->name ?? 'og', + 'scaleLevel' => $device?->deviceModel?->scale_level, + 'slot' => $renderedContent, + ])->render(); + } return $renderedContent; diff --git a/app/Services/PluginImportService.php b/app/Services/PluginImportService.php index c409d99..e824f35 100644 --- a/app/Services/PluginImportService.php +++ b/app/Services/PluginImportService.php @@ -267,38 +267,38 @@ class PluginImportService // If zipEntryPath is specified, look for files in that specific directory first if ($zipEntryPath) { - $targetDir = $tempDir . '/' . $zipEntryPath; + $targetDir = $tempDir.'/'.$zipEntryPath; if (File::exists($targetDir)) { // Check if files are directly in the target directory - if (File::exists($targetDir . '/settings.yml')) { - $settingsYamlPath = $targetDir . '/settings.yml'; - - if (File::exists($targetDir . '/full.liquid')) { - $fullLiquidPath = $targetDir . '/full.liquid'; - } elseif (File::exists($targetDir . '/full.blade.php')) { - $fullLiquidPath = $targetDir . '/full.blade.php'; + if (File::exists($targetDir.'/settings.yml')) { + $settingsYamlPath = $targetDir.'/settings.yml'; + + if (File::exists($targetDir.'/full.liquid')) { + $fullLiquidPath = $targetDir.'/full.liquid'; + } elseif (File::exists($targetDir.'/full.blade.php')) { + $fullLiquidPath = $targetDir.'/full.blade.php'; } - - if (File::exists($targetDir . '/shared.liquid')) { - $sharedLiquidPath = $targetDir . '/shared.liquid'; + + if (File::exists($targetDir.'/shared.liquid')) { + $sharedLiquidPath = $targetDir.'/shared.liquid'; } } - + // Check if files are in src subdirectory of target directory - if (!$settingsYamlPath && File::exists($targetDir . '/src/settings.yml')) { - $settingsYamlPath = $targetDir . '/src/settings.yml'; - - if (File::exists($targetDir . '/src/full.liquid')) { - $fullLiquidPath = $targetDir . '/src/full.liquid'; - } elseif (File::exists($targetDir . '/src/full.blade.php')) { - $fullLiquidPath = $targetDir . '/src/full.blade.php'; + if (! $settingsYamlPath && File::exists($targetDir.'/src/settings.yml')) { + $settingsYamlPath = $targetDir.'/src/settings.yml'; + + if (File::exists($targetDir.'/src/full.liquid')) { + $fullLiquidPath = $targetDir.'/src/full.liquid'; + } elseif (File::exists($targetDir.'/src/full.blade.php')) { + $fullLiquidPath = $targetDir.'/src/full.blade.php'; } - - if (File::exists($targetDir . '/src/shared.liquid')) { - $sharedLiquidPath = $targetDir . '/src/shared.liquid'; + + if (File::exists($targetDir.'/src/shared.liquid')) { + $sharedLiquidPath = $targetDir.'/src/shared.liquid'; } } - + // If we found the required files in the target directory, return them if ($settingsYamlPath && $fullLiquidPath) { return [