mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-07 11:39:30 +00:00
Made image size of preview images in tables configurable and slightly bigger by default
This makes PR #984 and #623 obsolete
This commit is contained in:
parent
0d1ae030be
commit
ecd2abe00e
4 changed files with 38 additions and 4 deletions
|
|
@ -70,6 +70,20 @@ class TableSettings
|
|||
PartTableColumns::CATEGORY, PartTableColumns::FOOTPRINT, PartTableColumns::MANUFACTURER,
|
||||
PartTableColumns::LOCATION, PartTableColumns::AMOUNT];
|
||||
|
||||
#[SettingsParameter(label: new TM("settings.behavior.table.preview_image_min_width"),
|
||||
formOptions: ['attr' => ['min' => 1, 'max' => 100]],
|
||||
envVar: "int:TABLE_IMAGE_PREVIEW_MIN_SIZE", envVarMode: EnvVarMode::OVERWRITE
|
||||
)]
|
||||
#[Assert\Range(min: 1, max: 100)]
|
||||
public int $previewImageMinWidth = 20;
|
||||
|
||||
#[SettingsParameter(label: new TM("settings.behavior.table.preview_image_max_width"),
|
||||
formOptions: ['attr' => ['min' => 1, 'max' => 100]],
|
||||
envVar: "int:TABLE_IMAGE_PREVIEW_MAX_SIZE", envVarMode: EnvVarMode::OVERWRITE
|
||||
)]
|
||||
#[Assert\Range(min: 1, max: 100)]
|
||||
#[Assert\GreaterThanOrEqual(propertyPath: 'previewImageMinWidth')]
|
||||
public int $previewImageMaxWidth = 35;
|
||||
|
||||
public static function mapPartsDefaultColumnsEnv(string $columns): array
|
||||
{
|
||||
|
|
@ -87,4 +101,4 @@ class TableSettings
|
|||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue