]> _ Git - pmi.git/commitdiff
try #5096 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Feb 2022 17:11:00 +0000 (18:11 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Feb 2022 17:11:00 +0000 (18:11 +0100)
resources/views/layouts/app.blade.php

index 528cbba24525a97c6aa079c12e142d540720a756..9e0fef5282fcb1e03b4239c8222994d891a0b31e 100644 (file)
@@ -1,17 +1,18 @@
 @prepend('stylesheets')
 
-@if ($variant === 'MICHSCI')
-    <link href="{{ mix('css/michsci.css') }}" rel="stylesheet">
-@else
-    <link href="{{ mix('css/app.css') }}" rel="stylesheet">
-@endif
+    @if ($variant === 'MICHSCI')
+        <link href="{{ mix('css/michsci.css') }}" rel="stylesheet">
+    @else
+        <link href="{{ mix('css/app.css') }}" rel="stylesheet">
+    @endif
 
-<link href="https://fonts.googleapis.com/css?family=Barlow:400,500,600|Muli:400,700&display=swap" rel="stylesheet">
+    <link href="https://fonts.googleapis.com/css?family=Barlow:400,500,600|Muli:400,700&display=swap" rel="stylesheet">
 @endprepend
 
 @prepend('scripts')
     {{-- Automatic polyfills --}}
-    <script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=String.prototype.normalize%2Ces6"></script>
+    <script crossorigin="anonymous"
+            src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=String.prototype.normalize%2Ces6"></script>
     {{-- MMenu polyfills --}}
     <script src="https://cdnjs.cloudflare.com/ajax/libs/dom4/2.0.0/dom4.js"></script>
 
             // Also hide chat box circle when closing it (only use side-menu for opening)
             $crisp.push(["on", "chat:closed", () => window.$crisp.push(["do", "chat:hide"])]);
 
-            (function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();
+            // Show the chat box when a message is received
+            $crisp.push(["on", "message:received", () => window.$crisp.push(["do", "chat:show"])]);
+
+            (function () {
+                d = document;
+                s = d.createElement("script");
+                s.src = "https://client.crisp.chat/l.js";
+                s.async = 1;
+                d.getElementsByTagName("head")[0].appendChild(s);
+            })();
         </script>
     @endisset
 @endprepend