feat: add branded tutorials and display-only plan device settings

This commit is contained in:
hellcat committed 2026-10-08 18:01:02 +08:00
1 parent 4f48e61a2c
commit cd117604a3
126 files changed
+1197 -9

No files matched your search

+3
View File
@@ -30,6 +30,7 @@ class PlanResource extends JsonResource
'transfer_enable' => $this->resource['transfer_enable'],
'speed_limit' => $this->resource['speed_limit'],
'device_limit' => $this->resource['device_limit'],
'display_device_limit' => $this->resource['display_device_limit'],
'show' => (bool) $this->resource['show'],
'sell' => (bool) $this->resource['sell'],
'renew' => (bool) $this->resource['renew'],
@@ -84,7 +85,9 @@ class PlanResource extends JsonResource
{
$content = $this->resource['content'] ?? '';
$displayDevices = $this->resource->getDisplayDeviceLimit();
$replacements = [
'{{display_devices}}' => $displayDevices === null || $displayDevices === 0 ? __('No Limit') : $displayDevices,
'{{transfer}}' => $this->resource['transfer_enable'],
'{{speed}}' => $this->resource['speed_limit'] === NULL ? __('No Limit') : $this->resource['speed_limit'],
'{{devices}}' => $this->resource['device_limit'] === NULL ? __('No Limit') : $this->resource['device_limit'],