diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php
index dfeb757..3c279d7 100644
--- a/app/Models/Plugin.php
+++ b/app/Models/Plugin.php
@@ -38,6 +38,8 @@ class Plugin extends Model
'markup_language' => 'string',
'configuration' => 'json',
'configuration_template' => 'json',
+ 'no_bleed' => 'boolean',
+ 'dark_mode' => 'boolean',
];
protected static function boot()
@@ -407,8 +409,8 @@ class Plugin extends Model
'plugin_settings' => [
'instance_name' => $this->name,
'strategy' => $this->data_strategy,
- 'dark_mode' => 'no',
- 'no_screen_padding' => 'no',
+ 'dark_mode' => $this->dark_mode ? 'yes' : 'no',
+ 'no_screen_padding' => $this->no_bleed ? 'yes' : 'no',
'polling_headers' => $this->polling_header,
'polling_url' => $this->polling_url,
'custom_fields_values' => [
@@ -432,6 +434,8 @@ class Plugin extends Model
return view('trmnl-layouts.single', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
+ 'noBleed' => $this->no_bleed,
+ 'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'slot' => $renderedContent,
])->render();
@@ -441,6 +445,7 @@ class Plugin extends Model
'mashupLayout' => $this->getPreviewMashupLayoutForSize($size),
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
+ 'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'slot' => $renderedContent,
])->render();
@@ -455,6 +460,8 @@ class Plugin extends Model
return view('trmnl-layouts.single', [
'colorDepth' => $device?->colorDepth(),
'deviceVariant' => $device?->deviceVariant() ?? 'og',
+ 'noBleed' => $this->no_bleed,
+ 'darkMode' => $this->dark_mode,
'scaleLevel' => $device?->scaleLevel(),
'slot' => view($this->render_markup_view, [
'size' => $size,
diff --git a/database/migrations/2025_10_30_144500_add_no_bleed_and_dark_mode_to_plugins_table.php b/database/migrations/2025_10_30_144500_add_no_bleed_and_dark_mode_to_plugins_table.php
new file mode 100644
index 0000000..f7329c8
--- /dev/null
+++ b/database/migrations/2025_10_30_144500_add_no_bleed_and_dark_mode_to_plugins_table.php
@@ -0,0 +1,32 @@
+boolean('no_bleed')->default(false)->after('configuration_template');
+ }
+ if (! Schema::hasColumn('plugins', 'dark_mode')) {
+ $table->boolean('dark_mode')->default(false)->after('no_bleed');
+ }
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('plugins', function (Blueprint $table): void {
+ if (Schema::hasColumn('plugins', 'dark_mode')) {
+ $table->dropColumn('dark_mode');
+ }
+ if (Schema::hasColumn('plugins', 'no_bleed')) {
+ $table->dropColumn('no_bleed');
+ }
+ });
+ }
+};
diff --git a/resources/views/livewire/plugins/recipe.blade.php b/resources/views/livewire/plugins/recipe.blade.php
index 832124f..c8907cf 100644
--- a/resources/views/livewire/plugins/recipe.blade.php
+++ b/resources/views/livewire/plugins/recipe.blade.php
@@ -15,6 +15,8 @@ new class extends Component {
public string|null $markup_language;
public string $name;
+ public bool $no_bleed = false;
+ public bool $dark_mode = false;
public int $data_stale_minutes;
public string $data_strategy;
public string|null $polling_url;
@@ -66,6 +68,10 @@ new class extends Component {
$this->markup_language = $this->plugin->markup_language ?? 'blade';
}
+ // Initialize screen settings from the model
+ $this->no_bleed = (bool) ($this->plugin->no_bleed ?? false);
+ $this->dark_mode = (bool) ($this->plugin->dark_mode ?? false);
+
$this->fillformFields();
$this->data_payload_updated_at = $this->plugin->data_payload_updated_at;
}
@@ -109,6 +115,8 @@ new class extends Component {
'device_weekdays' => 'array',
'device_active_from' => 'array',
'device_active_until' => 'array',
+ 'no_bleed' => 'boolean',
+ 'dark_mode' => 'boolean',
];
public function editSettings()
@@ -1024,6 +1032,22 @@ HTML;