Skip to content
Snippets Groups Projects
Commit bb6429fd authored by JC Brand's avatar JC Brand
Browse files

Renames to get it to work again

parent 7241ff1a
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> <script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="https://cdn.happy-dev.fr/ldp-display/ldp-base.html"/> <link rel="import" href="https://cdn.happy-dev.fr/ldp-display/ldp-base.html"/>
<link rel="import" href="ldp-chat.html"> <link rel="import" href="sib-chat.html">
<title>XMPP chat</title> <title>XMPP chat</title>
<style> <style>
body { body {
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<body> <body>
<div class="converse-container"> <div class="converse-container">
<ldp-chat <sib-chat
data-src="https://djangoldp.happy-dev.fr/users/1" data-src="https://djangoldp.happy-dev.fr/users/1"
data-authentication="anonymous" data-authentication="anonymous"
data-auto-login="true" data-auto-login="true"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
data-jid="nomnom.im" data-jid="nomnom.im"
data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json", data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json",
data-room-jid="anonymous@conference.nomnom.im"> data-room-jid="anonymous@conference.nomnom.im">
</ldp-chat> </sib-chat>
</div> </div>
</body> </body>
</html> </html>
...@@ -18,7 +18,7 @@ vim: tabstop=2 shiftwidth=2: ...@@ -18,7 +18,7 @@ vim: tabstop=2 shiftwidth=2:
<script> <script>
const template = document.currentScript.ownerDocument.querySelector('template'); const template = document.currentScript.ownerDocument.querySelector('template');
const template_base_url = template.baseURI.replace('ldp-chat.html', ''); const template_base_url = template.baseURI.replace('sib-chat.html', '');
template.content.querySelectorAll('link').forEach((el) => { template.content.querySelectorAll('link').forEach((el) => {
const href = el.getAttribute('href'); const href = el.getAttribute('href');
el.setAttribute('href', template_base_url + href); el.setAttribute('href', template_base_url + href);
...@@ -51,7 +51,7 @@ vim: tabstop=2 shiftwidth=2: ...@@ -51,7 +51,7 @@ vim: tabstop=2 shiftwidth=2:
} }
initConverse () { initConverse () {
const component = document.querySelector('ldp-chat'); const component = document.querySelector('sib-chat');
let auto_join_rooms = []; let auto_join_rooms = [];
let auto_join_private_chats = []; let auto_join_private_chats = [];
if (this.resource.jabberRoom) { if (this.resource.jabberRoom) {
...@@ -74,6 +74,6 @@ vim: tabstop=2 shiftwidth=2: ...@@ -74,6 +74,6 @@ vim: tabstop=2 shiftwidth=2:
} }
} }
window.addEventListener('WebComponentsReady', function () { window.addEventListener('WebComponentsReady', function () {
window.customElements.define("ldp-chat", ChatWindow); window.customElements.define("sib-chat", ChatWindow);
}); });
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment