Compare commits

...

5 commits

Author SHA1 Message Date
Benjamin Nussbaum
cc2cb070da feat: set PUPPETEER_WINDOW_SIZE_STRATEGY=v2 as default
Some checks are pending
tests / ci (push) Waiting to run
2026-02-17 22:30:00 +01:00
Benjamin Nussbaum
d884ac0a58 feat(#149): add css_name and css_variables to DeviceModel and update related views 2026-02-17 22:30:00 +01:00
Benjamin Nussbaum
89a2edfcbb feat: show version number on welcome page 2026-02-17 22:30:00 +01:00
Benjamin Nussbaum
d83a4095cb chore: update dependencies 2026-02-17 22:29:59 +01:00
dowjames
3419085325 Update Dockerfile to install extra fonts
My solution to:
https://github.com/usetrmnl/byos_laravel/issues/179
2026-02-17 21:59:22 +01:00
21 changed files with 429 additions and 154 deletions

View file

@ -30,6 +30,17 @@ COPY --chown=www-data:www-data .env.example .env
# Install the composer dependencies
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
# add extra fonts
RUN apk add --no-cache \
fontconfig \
font-noto \
font-noto-cjk-extra \
font-noto-emoji \
font-twemoji \
&& find /usr/share/fonts -name '*CJK*' ! -name '*Regular*' -delete \
&& fc-cache -f \
&& rm -rf /var/cache/fontconfig /var/cache/apk
########################
# Assets Image
########################

View file

@ -184,7 +184,7 @@ class GenerateDefaultImagesCommand extends Command
};
// Determine device properties from DeviceModel
$deviceVariant = $deviceModel->name ?? 'og';
$deviceVariant = $deviceModel->css_name ?? $deviceModel->name ?? 'og';
$colorDepth = $deviceModel->color_depth ?? '1bit'; // Use the accessor method
$scaleLevel = $deviceModel->scale_level; // Use the accessor method
$darkMode = $imageType === 'sleep'; // Sleep mode uses dark mode, setup uses light mode
@ -196,6 +196,7 @@ class GenerateDefaultImagesCommand extends Command
'deviceVariant' => $deviceVariant,
'colorDepth' => $colorDepth,
'scaleLevel' => $scaleLevel,
'cssVariables' => $deviceModel->css_variables,
])->render();
}
}

View file

@ -12,8 +12,10 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
final class FetchDeviceModelsJob implements ShouldQueue
{
@ -209,12 +211,41 @@ final class FetchDeviceModelsJob implements ShouldQueue
$attributes['palette_id'] = $firstPaletteId;
}
$attributes['css_name'] = $this->parseCssNameFromApi($modelData['css'] ?? null);
$attributes['css_variables'] = $this->parseCssVariablesFromApi($modelData['css'] ?? null);
DeviceModel::updateOrCreate(
['name' => $name],
$attributes
);
}
/**
* Extract css_name from API css payload (strip "screen--" prefix from classes.device).
*/
private function parseCssNameFromApi(mixed $css): ?string
{
$deviceClass = is_array($css) ? Arr::get($css, 'classes.device') : null;
return (is_string($deviceClass) ? Str::after($deviceClass, 'screen--') : null) ?: null;
}
/**
* Extract css_variables from API css payload (convert [[key, value], ...] to associative array).
*/
private function parseCssVariablesFromApi(mixed $css): ?array
{
$pairs = is_array($css) ? Arr::get($css, 'variables', []) : [];
if (! is_array($pairs)) {
return null;
}
$validPairs = Arr::where($pairs, fn (mixed $pair): bool => is_array($pair) && isset($pair[0], $pair[1]));
$variables = Arr::pluck($validPairs, 1, 0);
return $variables !== [] ? $variables : null;
}
/**
* Get the first palette ID from model data.
*/

View file

@ -27,6 +27,7 @@ final class DeviceModel extends Model
'offset_x' => 'integer',
'offset_y' => 'integer',
'published_at' => 'datetime',
'css_variables' => 'array',
];
public function getColorDepthAttribute(): ?string

View file

@ -140,8 +140,9 @@ class PlaylistItem extends Model
if (! $this->isMashup()) {
return view('trmnl-layouts.single', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'slot' => $this->plugin instanceof Plugin
? $this->plugin->render('full', false, $device)
: throw new Exception('Invalid plugin instance'),
@ -162,8 +163,9 @@ class PlaylistItem extends Model
return view('trmnl-layouts.mashup', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'mashupLayout' => $this->getMashupLayoutType(),
'slot' => implode('', $pluginMarkups),
])->render();

View file

@ -584,10 +584,11 @@ class Plugin extends Model
if ($size === 'full') {
return view('trmnl-layouts.single', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'noBleed' => $this->no_bleed,
'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'slot' => $renderedContent,
])->render();
}
@ -595,9 +596,10 @@ class Plugin extends Model
return view('trmnl-layouts.mashup', [
'mashupLayout' => $this->getPreviewMashupLayoutForSize($size),
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'slot' => $renderedContent,
])->render();
@ -617,10 +619,11 @@ class Plugin extends Model
if ($size === 'full') {
return view('trmnl-layouts.single', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'noBleed' => $this->no_bleed,
'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'slot' => $renderedView,
])->render();
}
@ -628,9 +631,10 @@ class Plugin extends Model
return view('trmnl-layouts.mashup', [
'mashupLayout' => $this->getPreviewMashupLayoutForSize($size),
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
'deviceVariant' => $device?->deviceModel?->css_name ?? $device?->deviceVariant() ?? 'og',
'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'cssVariables' => $device?->deviceModel?->css_variables,
'slot' => $renderedView,
])->render();
}

View file

@ -514,7 +514,7 @@ class ImageGenerationService
};
// Determine device properties from DeviceModel or device settings
$deviceVariant = $device->deviceVariant();
$deviceVariant = $device->deviceModel?->css_name ?? $device->deviceVariant();
$deviceOrientation = $device->rotate > 0 ? 'portrait' : 'landscape';
$colorDepth = $device->colorDepth() ?? '1bit';
$scaleLevel = $device->scaleLevel();
@ -528,6 +528,7 @@ class ImageGenerationService
'deviceOrientation' => $deviceOrientation,
'colorDepth' => $colorDepth,
'scaleLevel' => $scaleLevel,
'cssVariables' => $device->deviceModel?->css_variables,
];
// Add plugin name for error screens

View file

@ -15,8 +15,8 @@
"ext-imagick": "*",
"ext-simplexml": "*",
"ext-zip": "*",
"bnussbau/laravel-trmnl-blade": "2.3.*",
"bnussbau/trmnl-pipeline-php": "0.7.*",
"bnussbau/laravel-trmnl-blade": "^2.3",
"bnussbau/trmnl-pipeline-php": "^0.8",
"keepsuit/laravel-liquid": "^0.5.2",
"laravel/fortify": "^1.30",
"laravel/framework": "^12.1",

248
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "909d7acdf3f0ace9fb6d20b4de1eeaca",
"content-hash": "a1b56974da6a4f33fe847dba0549a6e0",
"packages": [
{
"name": "aws/aws-crt-php",
@ -62,16 +62,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.369.32",
"version": "3.369.36",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "4779292a30aa2d4a7ddfd519f80a94c2706ee64e"
"reference": "2a69e7df5e03be9e08f9f73fb6a8cc9dd63b59c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4779292a30aa2d4a7ddfd519f80a94c2706ee64e",
"reference": "4779292a30aa2d4a7ddfd519f80a94c2706ee64e",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2a69e7df5e03be9e08f9f73fb6a8cc9dd63b59c0",
"reference": "2a69e7df5e03be9e08f9f73fb6a8cc9dd63b59c0",
"shasum": ""
},
"require": {
@ -153,9 +153,9 @@
"support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.369.32"
"source": "https://github.com/aws/aws-sdk-php/tree/3.369.36"
},
"time": "2026-02-11T19:29:10+00:00"
"time": "2026-02-17T19:45:01+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -298,16 +298,16 @@
},
{
"name": "bnussbau/trmnl-pipeline-php",
"version": "0.7.0",
"version": "0.8.0",
"source": {
"type": "git",
"url": "https://github.com/bnussbau/trmnl-pipeline-php.git",
"reference": "da80de2b6456776eeabc1fb95fd42e5f3357d865"
"reference": "f7c86bf655d6f8ddd88e48575d0c9588c33eb07b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bnussbau/trmnl-pipeline-php/zipball/da80de2b6456776eeabc1fb95fd42e5f3357d865",
"reference": "da80de2b6456776eeabc1fb95fd42e5f3357d865",
"url": "https://api.github.com/repos/bnussbau/trmnl-pipeline-php/zipball/f7c86bf655d6f8ddd88e48575d0c9588c33eb07b",
"reference": "f7c86bf655d6f8ddd88e48575d0c9588c33eb07b",
"shasum": ""
},
"require": {
@ -349,7 +349,7 @@
],
"support": {
"issues": "https://github.com/bnussbau/trmnl-pipeline-php/issues",
"source": "https://github.com/bnussbau/trmnl-pipeline-php/tree/0.7.0"
"source": "https://github.com/bnussbau/trmnl-pipeline-php/tree/0.8.0"
},
"funding": [
{
@ -365,7 +365,7 @@
"type": "github"
}
],
"time": "2026-02-07T22:22:18+00:00"
"time": "2026-02-12T16:53:44+00:00"
},
{
"name": "brick/math",
@ -1894,16 +1894,16 @@
},
{
"name": "laravel/framework",
"version": "v12.51.0",
"version": "v12.52.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "ce4de3feb211e47c4f959d309ccf8a2733b1bc16"
"reference": "d5511fa74f4608dbb99864198b1954042aa8d5a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/ce4de3feb211e47c4f959d309ccf8a2733b1bc16",
"reference": "ce4de3feb211e47c4f959d309ccf8a2733b1bc16",
"url": "https://api.github.com/repos/laravel/framework/zipball/d5511fa74f4608dbb99864198b1954042aa8d5a7",
"reference": "d5511fa74f4608dbb99864198b1954042aa8d5a7",
"shasum": ""
},
"require": {
@ -2112,7 +2112,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2026-02-10T18:20:19+00:00"
"time": "2026-02-17T17:07:04+00:00"
},
{
"name": "laravel/prompts",
@ -3128,16 +3128,16 @@
},
{
"name": "livewire/flux",
"version": "v2.12.0",
"version": "v2.12.1",
"source": {
"type": "git",
"url": "https://github.com/livewire/flux.git",
"reference": "78bc26f54a29c28ff916751b9f796f4ce1592003"
"reference": "24c139b97b6df1e67c0235637f0e08c206bf4486"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/flux/zipball/78bc26f54a29c28ff916751b9f796f4ce1592003",
"reference": "78bc26f54a29c28ff916751b9f796f4ce1592003",
"url": "https://api.github.com/repos/livewire/flux/zipball/24c139b97b6df1e67c0235637f0e08c206bf4486",
"reference": "24c139b97b6df1e67c0235637f0e08c206bf4486",
"shasum": ""
},
"require": {
@ -3150,7 +3150,7 @@
"symfony/console": "^6.0|^7.0"
},
"conflict": {
"livewire/blaze": "<1.0.0"
"livewire/blaze": "<1.0.0-beta.2"
},
"type": "library",
"extra": {
@ -3188,9 +3188,9 @@
],
"support": {
"issues": "https://github.com/livewire/flux/issues",
"source": "https://github.com/livewire/flux/tree/v2.12.0"
"source": "https://github.com/livewire/flux/tree/v2.12.1"
},
"time": "2026-02-09T23:35:27+00:00"
"time": "2026-02-17T21:12:27+00:00"
},
{
"name": "livewire/livewire",
@ -3687,16 +3687,16 @@
},
{
"name": "nette/utils",
"version": "v4.1.2",
"version": "v4.1.3",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "f76b5dc3d6c6d3043c8d937df2698515b99cbaf5"
"reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/f76b5dc3d6c6d3043c8d937df2698515b99cbaf5",
"reference": "f76b5dc3d6c6d3043c8d937df2698515b99cbaf5",
"url": "https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe",
"reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe",
"shasum": ""
},
"require": {
@ -3708,8 +3708,10 @@
},
"require-dev": {
"jetbrains/phpstorm-attributes": "^1.2",
"nette/phpstan-rules": "^1.0",
"nette/tester": "^2.5",
"phpstan/phpstan": "^2.0@stable",
"phpstan/extension-installer": "^1.4@stable",
"phpstan/phpstan": "^2.1@stable",
"tracy/tracy": "^2.9"
},
"suggest": {
@ -3770,9 +3772,9 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.1.2"
"source": "https://github.com/nette/utils/tree/v4.1.3"
},
"time": "2026-02-03T17:21:09+00:00"
"time": "2026-02-13T03:05:33+00:00"
},
{
"name": "nikic/php-parser",
@ -3834,31 +3836,31 @@
},
{
"name": "nunomaduro/termwind",
"version": "v2.3.3",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/termwind.git",
"reference": "6fb2a640ff502caace8e05fd7be3b503a7e1c017"
"reference": "712a31b768f5daea284c2169a7d227031001b9a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/6fb2a640ff502caace8e05fd7be3b503a7e1c017",
"reference": "6fb2a640ff502caace8e05fd7be3b503a7e1c017",
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/712a31b768f5daea284c2169a7d227031001b9a8",
"reference": "712a31b768f5daea284c2169a7d227031001b9a8",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^8.2",
"symfony/console": "^7.3.6"
"symfony/console": "^7.4.4 || ^8.0.4"
},
"require-dev": {
"illuminate/console": "^11.46.1",
"laravel/pint": "^1.25.1",
"illuminate/console": "^11.47.0",
"laravel/pint": "^1.27.1",
"mockery/mockery": "^1.6.12",
"pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.1.3",
"pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.3.2",
"phpstan/phpstan": "^1.12.32",
"phpstan/phpstan-strict-rules": "^1.6.2",
"symfony/var-dumper": "^7.3.5",
"symfony/var-dumper": "^7.3.5 || ^8.0.4",
"thecodingmachine/phpstan-strict-rules": "^1.0.0"
},
"type": "library",
@ -3890,7 +3892,7 @@
"email": "enunomaduro@gmail.com"
}
],
"description": "Its like Tailwind CSS, but for the console.",
"description": "It's like Tailwind CSS, but for the console.",
"keywords": [
"cli",
"console",
@ -3901,7 +3903,7 @@
],
"support": {
"issues": "https://github.com/nunomaduro/termwind/issues",
"source": "https://github.com/nunomaduro/termwind/tree/v2.3.3"
"source": "https://github.com/nunomaduro/termwind/tree/v2.4.0"
},
"funding": [
{
@ -3917,7 +3919,7 @@
"type": "github"
}
],
"time": "2025-11-20T02:34:59+00:00"
"time": "2026-02-16T23:10:27+00:00"
},
{
"name": "om/icalparser",
@ -8536,16 +8538,16 @@
"packages-dev": [
{
"name": "brianium/paratest",
"version": "v7.17.0",
"version": "v7.19.0",
"source": {
"type": "git",
"url": "https://github.com/paratestphp/paratest.git",
"reference": "53cb90a6aa3ef3840458781600628ade058a18b9"
"reference": "7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/53cb90a6aa3ef3840458781600628ade058a18b9",
"reference": "53cb90a6aa3ef3840458781600628ade058a18b9",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6",
"reference": "7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6",
"shasum": ""
},
"require": {
@ -8556,13 +8558,13 @@
"fidry/cpu-core-counter": "^1.3.0",
"jean85/pretty-package-versions": "^2.1.1",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"phpunit/php-code-coverage": "^12.5.2",
"phpunit/php-file-iterator": "^6",
"phpunit/php-timer": "^8",
"phpunit/phpunit": "^12.5.8",
"sebastian/environment": "^8.0.3",
"symfony/console": "^7.3.4 || ^8.0.0",
"symfony/process": "^7.3.4 || ^8.0.0"
"phpunit/php-code-coverage": "^12.5.3 || ^13.0.1",
"phpunit/php-file-iterator": "^6.0.1 || ^7",
"phpunit/php-timer": "^8 || ^9",
"phpunit/phpunit": "^12.5.9 || ^13",
"sebastian/environment": "^8.0.3 || ^9",
"symfony/console": "^7.4.4 || ^8.0.4",
"symfony/process": "^7.4.5 || ^8.0.5"
},
"require-dev": {
"doctrine/coding-standard": "^14.0.0",
@ -8573,7 +8575,7 @@
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpstan/phpstan-phpunit": "^2.0.12",
"phpstan/phpstan-strict-rules": "^2.0.8",
"symfony/filesystem": "^7.3.2 || ^8.0.0"
"symfony/filesystem": "^7.4.0 || ^8.0.1"
},
"bin": [
"bin/paratest",
@ -8613,7 +8615,7 @@
],
"support": {
"issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v7.17.0"
"source": "https://github.com/paratestphp/paratest/tree/v7.19.0"
},
"funding": [
{
@ -8625,7 +8627,7 @@
"type": "paypal"
}
],
"time": "2026-02-05T09:14:44+00:00"
"time": "2026-02-06T10:53:26+00:00"
},
{
"name": "fakerphp/faker",
@ -9066,16 +9068,16 @@
},
{
"name": "laravel/boost",
"version": "v2.1.3",
"version": "v2.1.6",
"source": {
"type": "git",
"url": "https://github.com/laravel/boost.git",
"reference": "b96e0ab547d51d3810498dcc4d5535486991df6f"
"reference": "b8923e6131e5b705da299891284d327562445618"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/boost/zipball/b96e0ab547d51d3810498dcc4d5535486991df6f",
"reference": "b96e0ab547d51d3810498dcc4d5535486991df6f",
"url": "https://api.github.com/repos/laravel/boost/zipball/b8923e6131e5b705da299891284d327562445618",
"reference": "b8923e6131e5b705da299891284d327562445618",
"shasum": ""
},
"require": {
@ -9128,20 +9130,20 @@
"issues": "https://github.com/laravel/boost/issues",
"source": "https://github.com/laravel/boost"
},
"time": "2026-02-11T19:22:04+00:00"
"time": "2026-02-16T23:53:14+00:00"
},
{
"name": "laravel/mcp",
"version": "v0.5.6",
"version": "v0.5.9",
"source": {
"type": "git",
"url": "https://github.com/laravel/mcp.git",
"reference": "87905978bf2a230d6c01f8d03e172249e37917f7"
"reference": "39e8da60eb7bce4737c5d868d35a3fe78938c129"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/mcp/zipball/87905978bf2a230d6c01f8d03e172249e37917f7",
"reference": "87905978bf2a230d6c01f8d03e172249e37917f7",
"url": "https://api.github.com/repos/laravel/mcp/zipball/39e8da60eb7bce4737c5d868d35a3fe78938c129",
"reference": "39e8da60eb7bce4737c5d868d35a3fe78938c129",
"shasum": ""
},
"require": {
@ -9201,7 +9203,7 @@
"issues": "https://github.com/laravel/mcp/issues",
"source": "https://github.com/laravel/mcp"
},
"time": "2026-02-09T22:08:43+00:00"
"time": "2026-02-17T19:05:53+00:00"
},
{
"name": "laravel/pail",
@ -9619,39 +9621,36 @@
},
{
"name": "nunomaduro/collision",
"version": "v8.8.3",
"version": "v8.9.1",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/collision.git",
"reference": "1dc9e88d105699d0fee8bb18890f41b274f6b4c4"
"reference": "a1ed3fa530fd60bc515f9303e8520fcb7d4bd935"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/1dc9e88d105699d0fee8bb18890f41b274f6b4c4",
"reference": "1dc9e88d105699d0fee8bb18890f41b274f6b4c4",
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/a1ed3fa530fd60bc515f9303e8520fcb7d4bd935",
"reference": "a1ed3fa530fd60bc515f9303e8520fcb7d4bd935",
"shasum": ""
},
"require": {
"filp/whoops": "^2.18.1",
"nunomaduro/termwind": "^2.3.1",
"filp/whoops": "^2.18.4",
"nunomaduro/termwind": "^2.4.0",
"php": "^8.2.0",
"symfony/console": "^7.3.0"
"symfony/console": "^7.4.4 || ^8.0.4"
},
"conflict": {
"laravel/framework": "<11.44.2 || >=13.0.0",
"phpunit/phpunit": "<11.5.15 || >=13.0.0"
"laravel/framework": "<11.48.0 || >=14.0.0",
"phpunit/phpunit": "<11.5.50 || >=14.0.0"
},
"require-dev": {
"brianium/paratest": "^7.8.3",
"larastan/larastan": "^3.4.2",
"laravel/framework": "^11.44.2 || ^12.18",
"laravel/pint": "^1.22.1",
"laravel/sail": "^1.43.1",
"laravel/sanctum": "^4.1.1",
"laravel/tinker": "^2.10.1",
"orchestra/testbench-core": "^9.12.0 || ^10.4",
"pestphp/pest": "^3.8.2 || ^4.0.0",
"sebastian/environment": "^7.2.1 || ^8.0"
"brianium/paratest": "^7.8.5",
"larastan/larastan": "^3.9.2",
"laravel/framework": "^11.48.0 || ^12.52.0",
"laravel/pint": "^1.27.1",
"orchestra/testbench-core": "^9.12.0 || ^10.9.0",
"pestphp/pest": "^3.8.5 || ^4.4.1 || ^5.0.0",
"sebastian/environment": "^7.2.1 || ^8.0.3 || ^9.0.0"
},
"type": "library",
"extra": {
@ -9714,45 +9713,45 @@
"type": "patreon"
}
],
"time": "2025-11-20T02:55:25+00:00"
"time": "2026-02-17T17:33:08+00:00"
},
{
"name": "pestphp/pest",
"version": "v4.3.2",
"version": "v4.4.1",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest.git",
"reference": "3a4329ddc7a2b67c19fca8342a668b39be3ae398"
"reference": "f96a1b27864b585b0b29b0ee7331176726f7e54a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest/zipball/3a4329ddc7a2b67c19fca8342a668b39be3ae398",
"reference": "3a4329ddc7a2b67c19fca8342a668b39be3ae398",
"url": "https://api.github.com/repos/pestphp/pest/zipball/f96a1b27864b585b0b29b0ee7331176726f7e54a",
"reference": "f96a1b27864b585b0b29b0ee7331176726f7e54a",
"shasum": ""
},
"require": {
"brianium/paratest": "^7.16.1",
"nunomaduro/collision": "^8.8.3",
"nunomaduro/termwind": "^2.3.3",
"brianium/paratest": "^7.19.0",
"nunomaduro/collision": "^8.9.0",
"nunomaduro/termwind": "^2.4.0",
"pestphp/pest-plugin": "^4.0.0",
"pestphp/pest-plugin-arch": "^4.0.0",
"pestphp/pest-plugin-mutate": "^4.0.1",
"pestphp/pest-plugin-profanity": "^4.2.1",
"php": "^8.3.0",
"phpunit/phpunit": "^12.5.8",
"symfony/process": "^7.4.4|^8.0.0"
"phpunit/phpunit": "^12.5.12",
"symfony/process": "^7.4.5|^8.0.5"
},
"conflict": {
"filp/whoops": "<2.18.3",
"phpunit/phpunit": ">12.5.8",
"phpunit/phpunit": ">12.5.12",
"sebastian/exporter": "<7.0.0",
"webmozart/assert": "<1.11.0"
},
"require-dev": {
"pestphp/pest-dev-tools": "^4.0.0",
"pestphp/pest-plugin-browser": "^4.2.1",
"pestphp/pest-dev-tools": "^4.1.0",
"pestphp/pest-plugin-browser": "^4.3.0",
"pestphp/pest-plugin-type-coverage": "^4.0.3",
"psy/psysh": "^0.12.18"
"psy/psysh": "^0.12.20"
},
"bin": [
"bin/pest"
@ -9818,7 +9817,7 @@
],
"support": {
"issues": "https://github.com/pestphp/pest/issues",
"source": "https://github.com/pestphp/pest/tree/v4.3.2"
"source": "https://github.com/pestphp/pest/tree/v4.4.1"
},
"funding": [
{
@ -9830,7 +9829,7 @@
"type": "github"
}
],
"time": "2026-01-28T01:01:19+00:00"
"time": "2026-02-17T15:27:18+00:00"
},
{
"name": "pestphp/pest-plugin",
@ -10830,16 +10829,16 @@
},
{
"name": "phpunit/phpunit",
"version": "12.5.8",
"version": "12.5.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "37ddb96c14bfee10304825edbb7e66d341ec6889"
"reference": "418e06b3b46b0d54bad749ff4907fc7dfb530199"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/37ddb96c14bfee10304825edbb7e66d341ec6889",
"reference": "37ddb96c14bfee10304825edbb7e66d341ec6889",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/418e06b3b46b0d54bad749ff4907fc7dfb530199",
"reference": "418e06b3b46b0d54bad749ff4907fc7dfb530199",
"shasum": ""
},
"require": {
@ -10853,8 +10852,8 @@
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=8.3",
"phpunit/php-code-coverage": "^12.5.2",
"phpunit/php-file-iterator": "^6.0.0",
"phpunit/php-code-coverage": "^12.5.3",
"phpunit/php-file-iterator": "^6.0.1",
"phpunit/php-invoker": "^6.0.0",
"phpunit/php-text-template": "^5.0.0",
"phpunit/php-timer": "^8.0.0",
@ -10865,6 +10864,7 @@
"sebastian/exporter": "^7.0.2",
"sebastian/global-state": "^8.0.2",
"sebastian/object-enumerator": "^7.0.0",
"sebastian/recursion-context": "^7.0.1",
"sebastian/type": "^6.0.3",
"sebastian/version": "^6.0.0",
"staabm/side-effects-detector": "^1.0.5"
@ -10907,7 +10907,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.8"
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.12"
},
"funding": [
{
@ -10931,7 +10931,7 @@
"type": "tidelift"
}
],
"time": "2026-01-27T06:12:29+00:00"
"time": "2026-02-16T08:34:36+00:00"
},
{
"name": "rector/rector",
@ -11944,23 +11944,23 @@
},
{
"name": "ta-tikoma/phpunit-architecture-test",
"version": "0.8.6",
"version": "0.8.7",
"source": {
"type": "git",
"url": "https://github.com/ta-tikoma/phpunit-architecture-test.git",
"reference": "ad48430b92901fd7d003fdaf2d7b139f96c0906e"
"reference": "1248f3f506ca9641d4f68cebcd538fa489754db8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/ad48430b92901fd7d003fdaf2d7b139f96c0906e",
"reference": "ad48430b92901fd7d003fdaf2d7b139f96c0906e",
"url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/1248f3f506ca9641d4f68cebcd538fa489754db8",
"reference": "1248f3f506ca9641d4f68cebcd538fa489754db8",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.18.0 || ^5.0.0",
"php": "^8.1.0",
"phpdocumentor/reflection-docblock": "^5.3.0 || ^6.0.0",
"phpunit/phpunit": "^10.5.5 || ^11.0.0 || ^12.0.0",
"phpunit/phpunit": "^10.5.5 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"symfony/finder": "^6.4.0 || ^7.0.0 || ^8.0.0"
},
"require-dev": {
@ -11997,9 +11997,9 @@
],
"support": {
"issues": "https://github.com/ta-tikoma/phpunit-architecture-test/issues",
"source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.6"
"source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.7"
},
"time": "2026-01-30T07:16:00+00:00"
"time": "2026-02-17T17:25:14+00:00"
},
{
"name": "theseer/tokenizer",
@ -12053,16 +12053,16 @@
},
{
"name": "webmozart/assert",
"version": "2.1.2",
"version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649"
"reference": "b39f1870fc7c3e9e4a26106df5053354b9260a33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/ce6a2f100c404b2d32a1dd1270f9b59ad4f57649",
"reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/b39f1870fc7c3e9e4a26106df5053354b9260a33",
"reference": "b39f1870fc7c3e9e4a26106df5053354b9260a33",
"shasum": ""
},
"require": {
@ -12109,9 +12109,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/2.1.2"
"source": "https://github.com/webmozarts/assert/tree/2.1.4"
},
"time": "2026-01-13T14:02:24+00:00"
"time": "2026-02-17T12:17:51+00:00"
}
],
"aliases": [],

View file

@ -131,7 +131,7 @@ return [
'puppeteer_docker' => env('PUPPETEER_DOCKER', false),
'puppeteer_mode' => env('PUPPETEER_MODE', 'local'),
'puppeteer_wait_for_network_idle' => env('PUPPETEER_WAIT_FOR_NETWORK_IDLE', true),
'puppeteer_window_size_strategy' => env('PUPPETEER_WINDOW_SIZE_STRATEGY', null),
'puppeteer_window_size_strategy' => env('PUPPETEER_WINDOW_SIZE_STRATEGY', 'v2'),
'notifications' => [
'battery_low' => [

View file

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('device_models', function (Blueprint $table) {
$table->string('css_name')->nullable()->after('kind');
$table->json('css_variables')->nullable()->after('css_name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('device_models', function (Blueprint $table) {
$table->dropColumn(['css_name', 'css_variables']);
});
}
};

View file

@ -0,0 +1,160 @@
<?php
use App\Models\DeviceModel;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* CSS name and variables for device models created by seed_device_models (og_png until inky_impression_13_3).
*
* @var array<string, array{css_name: string, css_variables: array<string, string>}>
*/
private const SEEDED_CSS = [
'og_png' => [
'css_name' => 'og_png',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '480px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'og_plus' => [
'css_name' => 'ogv2',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '480px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'amazon_kindle_2024' => [
'css_name' => 'amazon_kindle_2024',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '480px',
'--ui-scale' => '0.8',
'--gap-scale' => '1.0',
],
],
'amazon_kindle_paperwhite_6th_gen' => [
'css_name' => 'amazon_kindle_paperwhite_6th_gen',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '600px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'amazon_kindle_paperwhite_7th_gen' => [
'css_name' => 'amazon_kindle_paperwhite_7th_gen',
'css_variables' => [
'--screen-w' => '905px',
'--screen-h' => '670px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'inkplate_10' => [
'css_name' => 'inkplate_10',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '547px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'amazon_kindle_7' => [
'css_name' => 'amazon_kindle_7',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '600px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'inky_impression_7_3' => [
'css_name' => 'inky_impression_7_3',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '480px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'kobo_libra_2' => [
'css_name' => 'kobo_libra_2',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '602px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'amazon_kindle_oasis_2' => [
'css_name' => 'amazon_kindle_oasis_2',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '602px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'kobo_aura_one' => [
'css_name' => 'kobo_aura_one',
'css_variables' => [
'--screen-w' => '1040px',
'--screen-h' => '780px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'kobo_aura_hd' => [
'css_name' => 'kobo_aura_hd',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '600px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
'inky_impression_13_3' => [
'css_name' => 'inky_impression_13_3',
'css_variables' => [
'--screen-w' => '800px',
'--screen-h' => '600px',
'--ui-scale' => '1.0',
'--gap-scale' => '1.0',
],
],
];
/**
* Run the migrations.
*/
public function up(): void
{
foreach (self::SEEDED_CSS as $name => $payload) {
DeviceModel::query()
->where('name', $name)
->update([
'css_name' => $payload['css_name'],
'css_variables' => $payload['css_variables'],
]);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
DeviceModel::query()
->whereIn('name', array_keys(self::SEEDED_CSS))
->update([
'css_name' => null,
'css_variables' => null,
]);
}
};

View file

@ -5,12 +5,14 @@
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
'pluginName' => 'Recipe',
])
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}">
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
<x-trmnl::view>
<x-trmnl::layout>
<x-trmnl::richtext gapSize="large" align="center">

View file

@ -5,11 +5,13 @@
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
])
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}">
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
<x-trmnl::view>
<x-trmnl::layout>
<x-trmnl::richtext gapSize="large" align="center">

View file

@ -5,11 +5,13 @@
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
])
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}">
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
<x-trmnl::view>
<x-trmnl::layout>
<x-trmnl::richtext gapSize="large" align="center">

View file

@ -39,6 +39,8 @@ new class extends Component
public $palette_id;
public $css_name;
protected $rules = [
'name' => 'required|string|max:255|unique:device_models,name',
'label' => 'required|string|max:255',
@ -102,10 +104,11 @@ new class extends Component
$this->offset_y = $deviceModel->offset_y;
$this->published_at = $deviceModel->published_at?->format('Y-m-d\TH:i');
$this->palette_id = $deviceModel->palette_id;
$this->css_name = $deviceModel->css_name;
} else {
$this->editingDeviceModelId = null;
$this->viewingDeviceModelId = null;
$this->reset(['name', 'label', 'description', 'width', 'height', 'colors', 'bit_depth', 'scale_factor', 'rotation', 'mime_type', 'offset_x', 'offset_y', 'published_at', 'palette_id']);
$this->reset(['name', 'label', 'description', 'width', 'height', 'colors', 'bit_depth', 'scale_factor', 'rotation', 'mime_type', 'offset_x', 'offset_y', 'published_at', 'palette_id', 'css_name']);
$this->mime_type = 'image/png';
$this->scale_factor = 1.0;
$this->rotation = 0;
@ -131,6 +134,7 @@ new class extends Component
'offset_y' => 'required|integer',
'published_at' => 'nullable|date',
'palette_id' => 'nullable|exists:device_palettes,id',
'css_name' => 'nullable|string|max:255',
];
if ($this->editingDeviceModelId) {
@ -158,6 +162,7 @@ new class extends Component
'offset_y' => $this->offset_y,
'published_at' => $this->published_at,
'palette_id' => $this->palette_id ?: null,
'css_name' => $this->css_name ?: null,
]);
$message = 'Device model updated successfully.';
} else {
@ -176,12 +181,13 @@ new class extends Component
'offset_y' => $this->offset_y,
'published_at' => $this->published_at,
'palette_id' => $this->palette_id ?: null,
'css_name' => $this->css_name ?: null,
'source' => 'manual',
]);
$message = 'Device model created successfully.';
}
$this->reset(['name', 'label', 'description', 'width', 'height', 'colors', 'bit_depth', 'scale_factor', 'rotation', 'mime_type', 'offset_x', 'offset_y', 'published_at', 'palette_id', 'editingDeviceModelId', 'viewingDeviceModelId']);
$this->reset(['name', 'label', 'description', 'width', 'height', 'colors', 'bit_depth', 'scale_factor', 'rotation', 'mime_type', 'offset_x', 'offset_y', 'published_at', 'palette_id', 'css_name', 'editingDeviceModelId', 'viewingDeviceModelId']);
Flux::modal('device-model-modal')->close();
$this->deviceModels = DeviceModel::all();
@ -217,6 +223,7 @@ new class extends Component
$this->offset_y = $deviceModel->offset_y;
$this->published_at = $deviceModel->published_at?->format('Y-m-d\TH:i');
$this->palette_id = $deviceModel->palette_id;
$this->css_name = $deviceModel->css_name;
$this->js('Flux.modal("device-model-modal").show()');
}
@ -344,6 +351,11 @@ new class extends Component
</flux:select>
</div>
<div class="mb-4">
<flux:input label="CSS Model Identifier" wire:model="css_name" id="css_name" class="block mt-1 w-full" type="text"
name="css_name" :disabled="(bool) $viewingDeviceModelId"/>
</div>
@if (!$viewingDeviceModelId)
<div class="flex">
<flux:spacer/>

View file

@ -248,7 +248,7 @@ new class extends Component
<flux:callout icon="check-circle" variant="success">
<flux:callout.heading>Up to Date</flux:callout.heading>
<flux:callout.text>
You are running the latest version {{ $latestVersion }}.
You are running the latest version.
</flux:callout.text>
</flux:callout>
@endif

View file

@ -6,18 +6,22 @@
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
])
@if(config('app.puppeteer_window_size_strategy') === 'v2')
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}">
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
<x-trmnl::mashup mashup-layout="{{ $mashupLayout }}">
{!! $slot !!}
</x-trmnl::mashup>
</x-trmnl::screen>
@else
<x-trmnl::screen colorDepth="{{$colorDepth}}">
<x-trmnl::screen colorDepth="{{$colorDepth}}" device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
<x-trmnl::mashup mashup-layout="{{ $mashupLayout }}">
{!! $slot !!}
</x-trmnl::mashup>

View file

@ -5,16 +5,21 @@
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
])
@if(config('app.puppeteer_window_size_strategy') === 'v2')
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}">
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
{!! $slot !!}
</x-trmnl::screen>
@else
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}">
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
scale-level="{{$scaleLevel}}"
:css-variables="$cssVariables">
{!! $slot !!}
</x-trmnl::screen>
@endif

View file

@ -1,19 +1,13 @@
@props([
'noBleed' => false,
'darkMode' => false,
'deviceVariant' => 'og',
'deviceVariant' => 'ogv2',
'deviceOrientation' => null,
'colorDepth' => '1bit',
'scaleLevel' => null,
'cssVariables' => null,
])
@php
// HOTFIX Github Issue https://github.com/usetrmnl/byos_laravel/issues/190
if ($colorDepth == '2bit'){
$deviceVariant = 'ogv2';
}
@endphp
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@ -33,6 +27,15 @@ if ($colorDepth == '2bit'){
<script src="{{ config('services.trmnl.base_url') }}/js/{{ config('trmnl-blade.framework_js_version') ?? config('trmnl-blade.framework_version', '2.1.0') }}/plugins.js"></script>
@endif
<title>{{ $title ?? config('app.name') }}</title>
@if(config('app.puppeteer_window_size_strategy') === 'v2' && !empty($cssVariables) && is_array($cssVariables))
<style>
:root {
@foreach($cssVariables as $name => $value)
{{ $name }}: {{ $value }};
@endforeach
}
</style>
@endif
</head>
<body class="environment trmnl">
<div class="screen {{ $noBleed ? 'screen--no-bleed' : '' }} {{ $darkMode ? 'dark-mode' : '' }} {{ $deviceVariant ? 'screen--' . $deviceVariant : '' }} {{ $deviceOrientation ? 'screen--' . $deviceOrientation : '' }} {{ $colorDepth ? 'screen--' . $colorDepth : '' }} {{ $scaleLevel ? 'screen--scale-' . $scaleLevel : '' }}">

View file

@ -32,6 +32,11 @@
@endif
</header>
@auth
@if(config('app.version'))
<flux:text class="text-xs">Version: <a href="https://github.com/usetrmnl/byos_laravel/releases/tag/{{ config('app.version') }}"
target="_blank">{{ config('app.version') }}</a>
</flux:text>
@endif
<livewire:update-check />
@endauth
</x-layouts::auth.card>