mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-07 09:51:45 +00:00
Compare commits
No commits in common. "ae08d9539d9ebcd2969abb6cce8f63758a9c5bea" and "7054c51490833015451b63e5eb75a5a4a7f83f21" have entirely different histories.
ae08d9539d
...
7054c51490
9 changed files with 1095 additions and 1103 deletions
|
|
@ -17,7 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Plugin, MarkdownGfmDataProcessor } from 'ckeditor5';
|
import { Plugin } from 'ckeditor5';
|
||||||
|
import {MarkdownGfmDataProcessor} from 'ckeditor5';
|
||||||
|
|
||||||
const ALLOWED_TAGS = [
|
const ALLOWED_TAGS = [
|
||||||
//Common elements
|
//Common elements
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
"hshn/base64-encoded-file": "^5.0",
|
"hshn/base64-encoded-file": "^5.0",
|
||||||
"jbtronics/2fa-webauthn": "^3.0.0",
|
"jbtronics/2fa-webauthn": "^3.0.0",
|
||||||
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
|
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
|
||||||
"jbtronics/settings-bundle": "^v2.7.0",
|
"jbtronics/settings-bundle": "^v2.6.0",
|
||||||
"jfcherng/php-diff": "^6.14",
|
"jfcherng/php-diff": "^6.14",
|
||||||
"knpuniversity/oauth2-client-bundle": "^2.15",
|
"knpuniversity/oauth2-client-bundle": "^2.15",
|
||||||
"league/commonmark": "^2.7",
|
"league/commonmark": "^2.7",
|
||||||
|
|
|
||||||
488
composer.lock
generated
488
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,6 @@
|
||||||
when@dev:
|
when@dev:
|
||||||
web_profiler:
|
web_profiler:
|
||||||
toolbar:
|
toolbar: true
|
||||||
ajax_replace: true
|
|
||||||
|
|
||||||
framework:
|
framework:
|
||||||
profiler:
|
profiler:
|
||||||
|
|
|
||||||
69
src/EventSubscriber/SymfonyDebugToolbarSubscriber.php
Normal file
69
src/EventSubscriber/SymfonyDebugToolbarSubscriber.php
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{% 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 %}
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{% extends "main_card.html.twig" %}
|
{% extends "main_card.html.twig" %}
|
||||||
{% macro genId(widget) %}{{ widget.vars.full_name }}{% endmacro %}
|
{% macro genId(widget) %}{{ widget.vars.full_name }}{% endmacro %}
|
||||||
|
|
||||||
{% form_theme form "form/settings_form.html.twig" %}
|
|
||||||
|
|
||||||
{% block title %}{% trans %}settings.title{% endtrans %}{% endblock %}
|
{% block title %}{% trans %}settings.title{% endtrans %}{% endblock %}
|
||||||
|
|
||||||
{% block card_title %}<i class="fa-solid fa-gears fa-fw"></i> {% trans %}settings.title{% endtrans %}{% endblock %}
|
{% block card_title %}<i class="fa-solid fa-gears fa-fw"></i> {% trans %}settings.title{% endtrans %}{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -13027,11 +13027,5 @@ Please note, that you can not impersonate a disabled user. If you try you will g
|
||||||
<target>System settings</target>
|
<target>System settings</target>
|
||||||
</segment>
|
</segment>
|
||||||
</unit>
|
</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>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue