...
 
Commits (2)
import 'https://unpkg.com/converse.js@4.1/dist/converse.min.js';
import { importCSS } from 'https://unpkg.com/@startinblox/core@0.6/src/helpers/index.js';
import SIBBase from 'https://unpkg.com/@startinblox/core@0.6/src/parents/sib-base.js';
import { store } from 'https://unpkg.com/@startinblox/core@0.6/src/store.js';
import { Helpers, SIBBase, store } from 'https://unpkg.com/@startinblox/core@0.7';
const base_url = import.meta.url.replace(/\/[^\/]*$/, '');
......@@ -33,13 +31,13 @@ export class ChatWindow extends SIBBase {
super();
this.attachShadow({ mode: 'open' });
this.shadowRoot.append(
...importCSS(
...Helpers.importCSS(
'https://unpkg.com/converse.js@4.1.0/css/converse.min.css',
`${base_url}/converse-embed.css`,
),
);
// Dirty fix. @see https://stackoverflow.com/questions/33696169/chrome-extension-font-awesome-wont-display-in-shadow-root
importCSS(
Helpers.importCSS(
'https://unpkg.com/converse.js@4.1.0/css/fonts.css'
);
if (typeof window.converse === 'undefined') {
......@@ -83,7 +81,7 @@ export class ChatWindow extends SIBBase {
.then(resource => resource.chatProfile['foaf:jabberID']);
await converse.initialize({
debug: true, //(this.dataset.debug === "true"),
debug: (this.dataset.debug === "true"),
root: this.shadowRoot,
authentication: this.dataset.authentication,
allow_non_roster_messaging: true,
......