Compare commits

..

6 commits

Author SHA1 Message Date
Jan Böhmer
eaaf44b391 Fixed disable logic and disable hints for info providers
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-24 21:10:38 +02:00
Jan Böhmer
a48490ac1a Show flash messages on saving settings 2025-08-24 21:01:07 +02:00
Jan Böhmer
cb63b3bde7 Set empty_data to null for APIKeyType 2025-08-24 20:54:04 +02:00
Jan Böhmer
f48791e961 Use a special form type for api key settings, that hide the api key by default as dots 2025-08-24 20:04:52 +02:00
Jan Böhmer
a75a60fecd Use settings-bundle 3.0.0 to ensure cache invalidation on env var change 2025-08-24 19:33:26 +02:00
Jan Böhmer
ac89489202 Allow to override the banner with its existing env variable 2025-08-24 17:37:16 +02:00
33 changed files with 261 additions and 69 deletions

4
.env
View file

@ -129,10 +129,6 @@ NO_URL_REWRITE_AVAILABLE=0
# Set to 1, if Part-DB should redirect all HTTP requests to HTTPS. You dont need to configure this, if your webserver already does this.
REDIRECT_TO_HTTPS=0
# Override value if you want to show to show a given text on homepage.
# When this is empty the content of config/banner.md is used as banner
BANNER=""
# Set this to zero, if you want to disable the year 2038 bug check on 32-bit systems (it will cause errors with current 32-bit PHP versions)
DISABLE_YEAR2038_BUG_CHECK=0

View file

@ -1,5 +1,14 @@
{
"controllers": {
"@symfony/ux-toggle-password": {
"toggle-password": {
"enabled": true,
"fetch": "eager",
"autoimport": {
"@symfony/ux-toggle-password/dist/style.min.css": true
}
}
},
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,

View file

@ -121,3 +121,10 @@ del {
background-color: #f09595;
font-weight: bold;
}
/****************************************
* Password toggle
****************************************/
.toggle-password-button {
top: 0.7rem !important;
}

View file

@ -31,7 +31,7 @@
"hshn/base64-encoded-file": "^5.0",
"jbtronics/2fa-webauthn": "^3.0.0",
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
"jbtronics/settings-bundle": "^v2.7.0",
"jbtronics/settings-bundle": "^3.0.0",
"jfcherng/php-diff": "^6.14",
"knpuniversity/oauth2-client-bundle": "^2.15",
"league/commonmark": "^2.7",
@ -80,6 +80,7 @@
"symfony/string": "7.3.*",
"symfony/translation": "7.3.*",
"symfony/twig-bundle": "7.3.*",
"symfony/ux-toggle-password": "^2.29",
"symfony/ux-translator": "^2.10",
"symfony/ux-turbo": "^2.0",
"symfony/validator": "7.3.*",

98
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2b0f46c3211d452d6bbd71a38ece8cbd",
"content-hash": "3b97b6338827ba56e0404860f3e98359",
"packages": [
{
"name": "amphp/amp",
@ -5090,16 +5090,16 @@
},
{
"name": "jbtronics/settings-bundle",
"version": "v2.7.0",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/jbtronics/settings-bundle.git",
"reference": "2f579554d52b3d5226b8569ccd13988f6403f6af"
"reference": "34b9629af73c7ad8989d8284470e79f3f8d79712"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/2f579554d52b3d5226b8569ccd13988f6403f6af",
"reference": "2f579554d52b3d5226b8569ccd13988f6403f6af",
"url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/34b9629af73c7ad8989d8284470e79f3f8d79712",
"reference": "34b9629af73c7ad8989d8284470e79f3f8d79712",
"shasum": ""
},
"require": {
@ -5160,7 +5160,7 @@
],
"support": {
"issues": "https://github.com/jbtronics/settings-bundle/issues",
"source": "https://github.com/jbtronics/settings-bundle/tree/v2.7.0"
"source": "https://github.com/jbtronics/settings-bundle/tree/v3.0.0"
},
"funding": [
{
@ -5172,7 +5172,7 @@
"type": "github"
}
],
"time": "2025-08-15T22:13:15+00:00"
"time": "2025-08-24T17:17:43+00:00"
},
{
"name": "jfcherng/php-color-output",
@ -15188,6 +15188,90 @@
],
"time": "2025-06-27T19:55:54+00:00"
},
{
"name": "symfony/ux-toggle-password",
"version": "v2.29.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/ux-toggle-password.git",
"reference": "ea74e8611e30979d9ec9b4c29d194f18a460a781"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/ux-toggle-password/zipball/ea74e8611e30979d9ec9b4c29d194f18a460a781",
"reference": "ea74e8611e30979d9ec9b4c29d194f18a460a781",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/config": "^5.4|^6.0|^7.0|^8.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0|^8.0",
"symfony/form": "^5.4|^6.0|^7.0|^8.0",
"symfony/http-kernel": "^5.4|^6.0|^7.0|^8.0",
"symfony/options-resolver": "^5.4|^6.0|^7.0|^8.0",
"symfony/translation": "^5.4|^6.0|^7.0|^8.0"
},
"require-dev": {
"symfony/framework-bundle": "^5.4|^6.0|^7.0|^8.0",
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0|^8.0",
"symfony/twig-bundle": "^5.4|^6.0|^7.0|^8.0",
"symfony/var-dumper": "^5.4|^6.0|^7.0|^8.0",
"twig/twig": "^2.14.7|^3.0.4"
},
"type": "symfony-bundle",
"extra": {
"thanks": {
"url": "https://github.com/symfony/ux",
"name": "symfony/ux"
}
},
"autoload": {
"psr-4": {
"Symfony\\UX\\TogglePassword\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Félix Eymonot",
"email": "felix.eymonot@alximy.io"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Toggle visibility of password inputs for Symfony Forms",
"homepage": "https://symfony.com",
"keywords": [
"symfony-ux"
],
"support": {
"source": "https://github.com/symfony/ux-toggle-password/tree/v2.29.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-08-18T09:13:24+00:00"
},
{
"name": "symfony/ux-translator",
"version": "v2.29.2",

View file

@ -1,14 +1,4 @@
Welcome to Part-DB.
**Attention**:
Since Version 2.0.0 this file is no longer used.
<small>If you want to change this banner, edit `config/banner.md` file or set the `BANNER` environment variable.</small>
<blockquote class="pb-0">
<p style="font-size: 12px">
And God said <br>
$\nabla \cdot \vec{D} = \rho$,
$\nabla \cdot \vec{B} = 0$,
$\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t}$,
$\nabla \times \vec{H} = \vec{j} + \frac{\partial \vec{D}}{\partial t}$, <br>
and then there was light.
</p>
</blockquote>
You can now set the banner text directly in the admin interface, or by setting the `BANNER` environment variable.

View file

@ -33,4 +33,5 @@ return [
Jbtronics\SettingsBundle\JbtronicsSettingsBundle::class => ['all' => true],
Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Symfony\UX\TogglePassword\TogglePasswordBundle::class => ['all' => true],
];

View file

@ -90,7 +90,6 @@ parameters:
env(ERROR_PAGE_SHOW_HELP): 1
env(DEMO_MODE): 0
env(BANNER): ''
env(EMAIL_SENDER_EMAIL): 'noreply@partdb.changeme'

View file

@ -24,4 +24,9 @@ easily upgrade your system to the new requirements. Otherwise, you can use the o
ships all required dependencies and is always up to date with the latest requirements, so that you do not have to worry
about the requirements at all.
## Changes
* The `config/banner.md` file that could been used to customize the banner text, was removed. You can now set the banner text
directly in the admin interface, or by setting the `BANNER` environment variable. If you want to keep your existing
banner text, you will have to copy it from the `config/banner.md` file to the admin interface or set the `BANNER`
environment variable.

View file

@ -7,6 +7,7 @@
"@hotwired/turbo": "^8.0.1",
"@popperjs/core": "^2.10.2",
"@symfony/stimulus-bridge": "^4.0.0",
"@symfony/ux-toggle-password": "file:vendor/symfony/ux-toggle-password/assets",
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
"@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/assets",
"@symfony/webpack-encore": "^5.0.0",

View file

@ -33,6 +33,8 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Cache\TagAwareCacheInterface;
use function Symfony\Component\Translation\t;
class SettingsController extends AbstractController
{
public function __construct(private readonly SettingsManagerInterface $settingsManager, private readonly SettingsFormFactoryInterface $settingsFormFactory)
@ -63,6 +65,12 @@ class SettingsController extends AbstractController
//It might be possible, that the tree settings have changed, so clear the cache
$cache->invalidateTags(['tree_treeview', 'sidebar_tree_update']);
$this->addFlash('success', t('settings.flash.saved'));
}
if ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('error', t('settings.flash.invalid'));
}
//Render the form

View file

@ -0,0 +1,54 @@
<?php
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
class APIKeyType extends AbstractType
{
public function getParent(): string
{
return PasswordType::class;
}
public function buildView(FormView $view, FormInterface $form, array $options): void
{
//Ensure that the field is never empty
$view->vars['value'] = $form->getViewData();
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'always_empty' => false,
'toggle' => true,
'empty_data' => null,
'attr' => ['autocomplete' => 'off'],
]);
}
}

View file

@ -78,7 +78,7 @@ class DigikeyProvider implements InfoProviderInterface
'description' => 'This provider uses the DigiKey API to search for parts.',
'url' => 'https://www.digikey.com/',
'oauth_app_name' => self::OAUTH_APP_NAME,
'disabled_help' => 'Set the PROVIDER_DIGIKEY_CLIENT_ID and PROVIDER_DIGIKEY_SECRET env option and connect OAuth to enable.'
'disabled_help' => 'Set the Client ID and Secret in provider settings and connect OAuth to enable.'
];
}
@ -101,7 +101,7 @@ class DigikeyProvider implements InfoProviderInterface
public function isActive(): bool
{
//The client ID has to be set and a token has to be available (user clicked connect)
return $this->settings->clientId !== '' && $this->authTokenManager->hasToken(self::OAUTH_APP_NAME);
return $this->settings->clientId !== null && $this->settings->clientId !== '' && $this->authTokenManager->hasToken(self::OAUTH_APP_NAME);
}
public function searchByKeyword(string $keyword): array

View file

@ -66,7 +66,7 @@ class Element14Provider implements InfoProviderInterface
'name' => 'Farnell element14',
'description' => 'This provider uses the Farnell element14 API to search for parts.',
'url' => 'https://www.element14.com/',
'disabled_help' => 'Configure the API key in the PROVIDER_ELEMENT14_KEY environment variable to enable.'
'disabled_help' => 'Configure the API key in the provider settings to enable.'
];
}

View file

@ -51,7 +51,7 @@ class LCSCProvider implements InfoProviderInterface
'name' => 'LCSC',
'description' => 'This provider uses the (unofficial) LCSC API to search for parts.',
'url' => 'https://www.lcsc.com/',
'disabled_help' => 'Set PROVIDER_LCSC_ENABLED to 1 (or true) in your environment variable config.'
'disabled_help' => 'Enable this provider in the provider settings.'
];
}

View file

@ -61,7 +61,7 @@ class MouserProvider implements InfoProviderInterface
'name' => 'Mouser',
'description' => 'This provider uses the Mouser API to search for parts.',
'url' => 'https://www.mouser.com/',
'disabled_help' => 'Configure the API key in the PROVIDER_MOUSER_KEY environment variable to enable.'
'disabled_help' => 'Configure the API key in the provider settings to enable.'
];
}

View file

@ -246,7 +246,7 @@ class OEMSecretsProvider implements InfoProviderInterface
'name' => 'OEMSecrets',
'description' => 'This provider uses the OEMSecrets API to search for parts.',
'url' => 'https://www.oemsecrets.com/',
'disabled_help' => 'Configure the API key in the PROVIDER_OEMSECRETS_KEY environment variable to enable.'
'disabled_help' => 'Configure the API key in the provider settings to enable.'
];
}
/**
@ -265,7 +265,7 @@ class OEMSecretsProvider implements InfoProviderInterface
*/
public function isActive(): bool
{
return $this->settings->apiKey !== '';
return $this->settings->apiKey !== null && $this->settings->apiKey !== '';
}

View file

@ -170,7 +170,7 @@ class OctopartProvider implements InfoProviderInterface
'name' => 'Octopart',
'description' => 'This provider uses the Nexar/Octopart API to search for parts on Octopart.',
'url' => 'https://www.octopart.com/',
'disabled_help' => 'Set the PROVIDER_OCTOPART_CLIENT_ID and PROVIDER_OCTOPART_SECRET env option.'
'disabled_help' => 'Set the Client ID and Secret in provider settings.'
];
}
@ -183,7 +183,8 @@ class OctopartProvider implements InfoProviderInterface
{
//The client ID has to be set and a token has to be available (user clicked connect)
//return /*!empty($this->clientId) && */ $this->authTokenManager->hasToken(self::OAUTH_APP_NAME);
return $this->settings->clientId !== '' && $this->settings->secret !== '';
return $this->settings->clientId !== null && $this->settings->clientId !== ''
&& $this->settings->secret !== null && $this->settings->secret !== '';
}
private function mapLifeCycleStatus(?string $value): ?ManufacturingStatus

View file

@ -51,7 +51,7 @@ class PollinProvider implements InfoProviderInterface
'name' => 'Pollin',
'description' => 'Webscraping from pollin.de to get part information',
'url' => 'https://www.pollin.de/',
'disabled_help' => 'Set PROVIDER_POLLIN_ENABLED env to 1'
'disabled_help' => 'Enable the provider in provider settings'
];
}

View file

@ -51,7 +51,7 @@ class ReicheltProvider implements InfoProviderInterface
'name' => 'Reichelt',
'description' => 'Webscraping from reichelt.com to get part information',
'url' => 'https://www.reichelt.com/',
'disabled_help' => 'Set PROVIDER_REICHELT_ENABLED env to 1'
'disabled_help' => 'Enable provider in provider settings.'
];
}

View file

@ -54,7 +54,7 @@ class TMEProvider implements InfoProviderInterface
'name' => 'TME',
'description' => 'This provider uses the API of TME (Transfer Multipart).',
'url' => 'https://tme.eu/',
'disabled_help' => 'Configure the PROVIDER_TME_KEY and PROVIDER_TME_SECRET environment variables to use this provider.'
'disabled_help' => 'Configure the API Token and secret in provider settings to use this provider.'
];
}

View file

@ -30,7 +30,7 @@ use App\Settings\SystemSettings\CustomizationSettings;
*/
class BannerHelper
{
public function __construct(private CustomizationSettings $customizationSettings)
public function __construct(private readonly CustomizationSettings $customizationSettings)
{
}

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -42,12 +43,14 @@ class DigikeySettings
#[SettingsParameter(
label: new TM("settings.ips.digikey.client_id"),
formType: APIKeyType::class,
envVar: "PROVIDER_DIGIKEY_CLIENT_ID", envVarMode: EnvVarMode::OVERWRITE
)]
public ?string $clientId = null;
#[SettingsParameter(
label: new TM("settings.ips.digikey.secret"),
formType: APIKeyType::class,
envVar: "PROVIDER_DIGIKEY_SECRET", envVarMode: EnvVarMode::OVERWRITE
)]
public ?string $secret = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -36,7 +37,8 @@ class Element14Settings
{
use SettingsTrait;
#[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), description: new TM("settings.ips.element14.apiKey.help"),
#[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), description: new TM("settings.ips.element14.apiKey.help"),#
formType: APIKeyType::class,
formOptions: ["help_html" => true], envVar: "PROVIDER_ELEMENT14_KEY", envVarMode: EnvVarMode::OVERWRITE)]
public ?string $apiKey = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -35,6 +36,7 @@ use Symfony\Component\Translation\TranslatableMessage as TM;
class MouserSettings
{
#[SettingsParameter(label: new TM("settings.ips.mouser.apiKey"), description: new TM("settings.ips.mouser.apiKey.help"),
formType: APIKeyType::class,
formOptions: ["help_html" => true], envVar: "PROVIDER_MOUSER_KEY", envVarMode: EnvVarMode::OVERWRITE)]
public ?string $apiKey = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -43,6 +44,7 @@ class OEMSecretsSettings
"NZD", "RUB", "SEK", "SGD", "TWD", "USD"];
#[SettingsParameter(label: new TM("settings.ips.element14.apiKey"),
formType: APIKeyType::class,
envVar: "PROVIDER_OEMSECRETS_KEY", envVarMode: EnvVarMode::OVERWRITE)]
public ?string $apiKey = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -42,12 +43,14 @@ class OctopartSettings
#[SettingsParameter(
label: new TM("settings.ips.digikey.client_id"),
envVar: "PROVIDER_OCTOPART_CLIENT_ID", envVarMode: EnvVarMode::OVERWRITE
formType: APIKeyType::class,
envVar: "PROVIDER_OCTOPART_CLIENT_ID", envVarMode: EnvVarMode::OVERWRITE,
)]
public ?string $clientId = null;
#[SettingsParameter(
label: new TM("settings.ips.digikey.secret"),
formType: APIKeyType::class,
envVar: "PROVIDER_OCTOPART_SECRET", envVarMode: EnvVarMode::OVERWRITE
)]
public ?string $secret = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\InfoProviderSystem;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -43,11 +44,13 @@ class TMESettings
private const SUPPORTED_CURRENCIES = ["EUR", "USD", "PLN", "GBP"];
#[SettingsParameter(label: new TM("settings.ips.tme.token"),
description: new TM("settings.ips.tme.token.help"), formOptions: ["help_html" => true],
description: new TM("settings.ips.tme.token.help"),
formType: APIKeyType::class, formOptions: ["help_html" => true],
envVar: "PROVIDER_TME_KEY", envVarMode: EnvVarMode::OVERWRITE)]
public ?string $apiToken = null;
#[SettingsParameter(label: new TM("settings.ips.tme.secret"),
formType: APIKeyType::class,
envVar: "PROVIDER_TME_SECRET", envVarMode: EnvVarMode::OVERWRITE)]
public ?string $apiSecret = null;

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Settings\MiscSettings;
use App\Form\Type\APIKeyType;
use App\Settings\SettingsIcon;
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
use Jbtronics\SettingsBundle\Settings\Settings;
@ -35,6 +36,7 @@ class ExchangeRateSettings
{
#[SettingsParameter(label: new TM("settings.misc.exchange_rate.fixer_api_key"),
description: new TM("settings.misc.exchange_rate.fixer_api_key.help"),
formType: APIKeyType::class,
envVar: "FIXER_API_KEY", envVarMode: EnvVarMode::OVERWRITE,
)]
public ?string $fixerApiKey = null;

View file

@ -49,6 +49,7 @@ class CustomizationSettings
#[SettingsParameter(
label: new TM("settings.system.customization.banner"),
formType: RichTextEditorType::class, formOptions: ['mode' => 'markdown-full'],
envVar: "BANNER", envVarMode: EnvVarMode::OVERWRITE,
)]
public ?string $banner = null;

View file

@ -729,6 +729,9 @@
},
"files": []
},
"symfony/ux-toggle-password": {
"version": "v2.29.2"
},
"symfony/ux-translator": {
"version": "2.9",
"recipe": {

View file

@ -13033,5 +13033,17 @@ Please note, that you can not impersonate a disabled user. If you try you will g
<target>The value of this parameter can be overridden by setting the environment variable "%env%".</target>
</segment>
</unit>
<unit id="boWkQh7" name="settings.flash.saved">
<segment>
<source>settings.flash.saved</source>
<target>Settings saved successfully.</target>
</segment>
</unit>
<unit id="tEYWrWD" name="settings.flash.invalid">
<segment>
<source>settings.flash.invalid</source>
<target>Settings are invalid. Please check your input!</target>
</segment>
</unit>
</file>
</xliff>

View file

@ -2023,6 +2023,9 @@
loader-utils "^2.0.0 || ^3.0.0"
schema-utils "^3.0.0 || ^4.0.0"
"@symfony/ux-toggle-password@file:vendor/symfony/ux-toggle-password/assets":
version "2.29.1"
"@symfony/ux-translator@file:vendor/symfony/ux-translator/assets":
version "2.29.1"