From: Vincent Vanwaelscappel Date: Tue, 15 Feb 2022 17:11:00 +0000 (+0100) Subject: try #5096 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c494f7185863abc5844711354e130a80ebe6a4f8;p=pmi.git try #5096 @0.25 --- diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 528cbba..9e0fef5 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1,17 +1,18 @@ @prepend('stylesheets') -@if ($variant === 'MICHSCI') - -@else - -@endif + @if ($variant === 'MICHSCI') + + @else + + @endif - + @endprepend @prepend('scripts') {{-- Automatic polyfills --}} - + {{-- MMenu polyfills --}} @@ -42,7 +43,16 @@ // 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); + })(); @endisset @endprepend