feature - chat component on the right view

This commit is contained in:
Alexandre Bourlier
2018-07-31 23:42:43 +02:00
parent 687afddf50
commit bbb8e0a24c
18 changed files with 61 additions and 43 deletions

View File

@ -36,5 +36,25 @@
<?php require_once('src/html/channel.php'); ?>
<?php require_once('src/html/search.html'); ?>
</main>
<sib-chat
id="chat-singleton"
data-authentication="login"
data-auto-login="true"
data-bosh-service-url="https://jabber.happy-dev.fr/http-bind/"
data-debug="false"
data-locales-url="en"
bind-resources
></sib-chat>
<script>
window.addEventListener('navigate', event => {
var chatSingleton = document.querySelector("#chat-singleton");
var view = document.getElementById(event.detail.route);
view.querySelector(".chat-view").appendChild(chatSingleton);
chatSingleton.dataset.src = view.dataset.src;
});
</script>
</body>
</html>