Compare commits

...

4 commits

Author SHA1 Message Date
Jan Böhmer
ae08d9539d Fixed ckeditor loading
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 12:35:14 +02:00
Jan Böhmer
275b695d6b Use ajax_replace option for symfony debug toolbar instead of custom event subscriber 2025-08-24 12:24:08 +02:00
Jan Böhmer
d4d80de10f Show a tooltip on which env needs to be set to override a certain settings parameter 2025-08-24 12:03:37 +02:00
Jan Böhmer
49ddb2938f Updated dependencies 2025-08-24 11:33:35 +02:00
9 changed files with 1103 additions and 1095 deletions

View file

@ -17,8 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Plugin } from 'ckeditor5';
import {MarkdownGfmDataProcessor} from 'ckeditor5';
import { Plugin, MarkdownGfmDataProcessor } from 'ckeditor5';
const ALLOWED_TAGS = [
//Common elements

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.6.0",
"jbtronics/settings-bundle": "^v2.7.0",
"jfcherng/php-diff": "^6.14",
"knpuniversity/oauth2-client-bundle": "^2.15",
"league/commonmark": "^2.7",

488
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
when@dev:
web_profiler:
toolbar: true
toolbar:
ajax_replace: true
framework:
profiler:

View file

@ -1,69 +0,0 @@
<?php
/**
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2022 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\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
/**
* This subscriber sets a Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
*/
final class SymfonyDebugToolbarSubscriber implements EventSubscriberInterface
{
public function __construct(private readonly bool $kernel_debug_enabled)
{
}
/**
* Returns an array of event names this subscriber wants to listen to.
*
* The array keys are event names and the value can be:
*
* * The method name to call (priority defaults to 0)
* * An array composed of the method name to call and the priority
* * An array of arrays composed of the method names to call and respective
* priorities, or 0 if unset
*
* For instance:
*
* * ['eventName' => 'methodName']
* * ['eventName' => ['methodName', $priority]]
* * ['eventName' => [['methodName1', $priority], ['methodName2']]]
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents(): array
{
return ['kernel.response' => 'onKernelResponse'];
}
public function onKernelResponse(ResponseEvent $event): void
{
if (!$this->kernel_debug_enabled) {
return;
}
$response = $event->getResponse();
$response->headers->set('Symfony-Debug-Toolbar-Replace', '1');
}
}

View file

@ -0,0 +1,25 @@
{% extends "form/extended_bootstrap_layout.html.twig" %}
{% block form_label %}
{# If parameter_envvar exists on form then show it as tooltip #}
{% if parameter_envvar is defined and parameter_envvar is not null %}
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
{% endif %}
{{- parent() -}}
{% endblock %}
{% block checkbox_radio_label %}
{# If parameter_envvar exists on form then show it as tooltip #}
{% if parameter_envvar is defined and parameter_envvar is not null %}
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
{% endif %}
{{- parent() -}}
{% endblock %}
{% block tristate_label %}
{# If parameter_envvar exists on form then show it as tooltip #}
{% if parameter_envvar is defined and parameter_envvar is not null %}
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
{% endif %}
{{- parent() -}}
{% endblock %}

View file

@ -1,6 +1,8 @@
{% extends "main_card.html.twig" %}
{% macro genId(widget) %}{{ widget.vars.full_name }}{% endmacro %}
{% form_theme form "form/settings_form.html.twig" %}
{% block title %}{% trans %}settings.title{% endtrans %}{% endblock %}
{% block card_title %}<i class="fa-solid fa-gears fa-fw"></i> {% trans %}settings.title{% endtrans %}{% endblock %}
@ -57,4 +59,4 @@
</div>
{{ form_end(form) }}
{% endblock %}
{% endblock %}

View file

@ -13027,5 +13027,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g
<target>System settings</target>
</segment>
</unit>
<unit id="3YsJ4i6" name="settings.tooltip.overrideable_by_env">
<segment>
<source>settings.tooltip.overrideable_by_env</source>
<target>The value of this parameter can be overridden by setting the environment variable "%env%".</target>
</segment>
</unit>
</file>
</xliff>

1598
yarn.lock

File diff suppressed because it is too large Load diff