mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
parent
2d76afee6f
commit
8958e65ec2
3 changed files with 34 additions and 33 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue