Allow to define icons for settings

This commit is contained in:
Jan Böhmer 2024-08-04 00:00:38 +02:00
parent 947cce78d7
commit 47830dcd08
8 changed files with 72 additions and 3 deletions

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\SystemSettings;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
use Jbtronics\SettingsBundle\Settings\SettingsParameter;
@ -31,6 +32,7 @@ use Symfony\Component\Translation\TranslatableMessage as TM;
use Symfony\Component\Validator\Constraints as Assert;
#[Settings(label: new TM("settings.system.attachments"))]
#[SettingsIcon("fa-paperclip")]
class AttachmentsSettings
{
use SettingsTrait;

View file

@ -25,6 +25,7 @@ namespace App\Settings\SystemSettings;
use App\Form\Type\RichTextEditorType;
use App\Form\Type\ThemeChoiceType;
use App\Settings\SettingsIcon;
use App\Validator\Constraints\ValidTheme;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -33,6 +34,7 @@ use Jbtronics\SettingsBundle\Settings\SettingsTrait;
use Symfony\Component\Translation\TranslatableMessage as TM;
#[Settings(name: "customization", label: new TM("settings.system.customization"))]
#[SettingsIcon("fa-paint-roller")]
class CustomizationSettings
{
use SettingsTrait;

View file

@ -25,6 +25,7 @@ namespace App\Settings\SystemSettings;
use App\Form\History\EnforceEventCommentTypesType;
use App\Services\LogSystem\EventCommentType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\ParameterTypes\ArrayType;
use Jbtronics\SettingsBundle\ParameterTypes\EnumType;
@ -34,6 +35,7 @@ use Jbtronics\SettingsBundle\Settings\SettingsTrait;
use Symfony\Component\Translation\TranslatableMessage as TM;
#[Settings(label: new TM("settings.system.history"))]
#[SettingsIcon("fa-binoculars")]
class HistorySettings
{
use SettingsTrait;

View file

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace App\Settings\SystemSettings;
use App\Form\Type\LocaleSelectType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
use Jbtronics\SettingsBundle\Settings\SettingsParameter;
@ -34,6 +35,7 @@ use Symfony\Component\Translation\TranslatableMessage as TM;
use Symfony\Component\Validator\Constraints as Assert;
#[Settings(label: new TM("settings.system.localization"))]
#[SettingsIcon("fa-globe")]
class LocalizationSettings
{
use SettingsTrait;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\SystemSettings;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
use Jbtronics\SettingsBundle\Settings\SettingsParameter;
@ -30,6 +31,7 @@ use Jbtronics\SettingsBundle\Settings\SettingsTrait;
use Symfony\Component\Translation\TranslatableMessage as TM;
#[Settings(label: new TM("settings.system.privacy"))]
#[SettingsIcon("fa-location-pin-lock")]
class PrivacySettings
{
use SettingsTrait;
@ -48,5 +50,4 @@ class PrivacySettings
description: new TM("settings.system.privacy.useGravatar.description"),
envVar: 'bool:USE_GRAVATAR', envVarMode: EnvVarMode::OVERWRITE)]
public bool $useGravatar = false;
}