add settings (stats, giphy)
This commit is contained in:
parent
4e9d26a35e
commit
d0d3502657
2
.env
2
.env
|
@ -35,5 +35,3 @@ MAILER_URL=null://localhost
|
||||||
###< symfony/swiftmailer-bundle ###
|
###< symfony/swiftmailer-bundle ###
|
||||||
|
|
||||||
ASSET_BASE_URL=null
|
ASSET_BASE_URL=null
|
||||||
UMAMI_URL=
|
|
||||||
GIPHY_API_KEY=
|
|
||||||
|
|
|
@ -5,6 +5,3 @@ twig:
|
||||||
paths:
|
paths:
|
||||||
'%kernel.project_dir%/templates/core/': Core
|
'%kernel.project_dir%/templates/core/': Core
|
||||||
'%kernel.project_dir%/core/Resources/views/': Core
|
'%kernel.project_dir%/core/Resources/views/': Core
|
||||||
globals:
|
|
||||||
umami_url: '%env(UMAMI_URL)%'
|
|
||||||
giphy_api_key: '%env(GIPHY_API_KEY)%'
|
|
||||||
|
|
|
@ -30,6 +30,10 @@ class SettingEventSubscriber extends EventSubscriber
|
||||||
$this->manager->init('email_sender', '🤖 E-mail', 'Expéditeur', '');
|
$this->manager->init('email_sender', '🤖 E-mail', 'Expéditeur', '');
|
||||||
$this->manager->init('email_contact', '🤖 E-mail', 'Destinataire formulaire de contact', '');
|
$this->manager->init('email_contact', '🤖 E-mail', 'Destinataire formulaire de contact', '');
|
||||||
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
|
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
|
||||||
|
|
||||||
|
$this->manager->init('stats_umami_url', '📊 Statistiques', 'Adresse tableau de bord Umami', '');
|
||||||
|
|
||||||
|
$this->manager->init('giphy_api_key', '🌐 API', 'Clé d\'API Giphy', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onFormInit(SettingEvent $event)
|
public function onFormInit(SettingEvent $event)
|
||||||
|
|
|
@ -114,7 +114,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
<script>
|
<script>
|
||||||
const giphy = {
|
const giphy = {
|
||||||
baseURL: 'https://api.giphy.com/v1/gifs/',
|
baseURL: 'https://api.giphy.com/v1/gifs/',
|
||||||
apiKey: '{{ giphy_api_key }}',
|
apiKey: '{{ setting('giphy_api_key') }}',
|
||||||
tag: '{% block tag %}error{% endblock %}',
|
tag: '{% block tag %}error{% endblock %}',
|
||||||
type: 'random',
|
type: 'random',
|
||||||
rating: 'pg-13'
|
rating: 'pg-13'
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<iframe src="{{ umami_url }}" class="col-12" frameborder="0" style="height: calc(100vh - 60px)"></iframe>
|
<iframe src="{{ setting('stats_umami_url') }}" class="col-12" frameborder="0" style="height: calc(100vh - 60px)"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue