File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
44 <body >
55 <referenceBlock name =" loki.script" >
6- <block name =" loki.alpinejs" template =" Loki_Base::script/alpine-csp.phtml" />
6+ <block name =" loki.alpinejs" template =" Loki_Base::script/alpine-csp.phtml" >
7+ <arguments >
8+ <argument name =" module_config" xsi : type =" object" >Loki\Base\ViewModel\ModuleConfig</argument >
9+ </arguments >
10+ </block >
711 </referenceBlock >
812 </body >
913</page >
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3+ use Loki \Base \ViewModel \ModuleConfig ;
34use Magento \Framework \View \Element \Template ;
45
56/** @version 1.1.10 */
67/** @var Template $block */
8+ /** @var ModuleConfig $moduleConfig */
79
810$ jsUrl = $ block ->getViewFileUrl ('Loki_Base::js/alpine-csp.js ' );
911$ defer = (bool )$ block ->getDefer ();
12+ $ moduleConfig = $ block ->getModuleConfig ();
13+
14+ if ($ moduleConfig ->isEnabled ('MageOS_AlpineLoader ' )) {
15+ return ;
16+ }
1017?>
1118<script defer src="<?= /* @noEscape */ $ jsUrl ?> " <?php if ($ defer ) : ?> defer<?php endif ; ?> ></script>
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ if (false === is_numeric($timeout) || $timeout < 0) {
2121 timeout: <?= (int )$ timeout ?> ,
2222 init() {
2323 Alpine.effect(() => {
24+ console.log('Fetching messages...');
2425 this.messages = Alpine.store('Message').getMessages();
2526 });
2627 },
You can’t perform that action at this time.
0 commit comments