Merge branch 'release/sxc-149' into feature/port-test
This commit is contained in:
commit
6f143b0ebb
@ -31,7 +31,7 @@ if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
|
|||||||
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
|
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
|
||||||
|
|
||||||
if endpoints.users || (endpoints.get && endpoints.get.users)
|
if endpoints.users || (endpoints.get && endpoints.get.users)
|
||||||
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.8" defer)
|
script(type="module" src="https://unpkg.com/@startinblox/component-chat@1.0" defer)
|
||||||
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
|
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
|
||||||
|
|
||||||
script(src="/scripts/index.js" defer)
|
script(src="/scripts/index.js" defer)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function (event) {
|
document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
window.addEventListener('newMessage', event => {
|
window.addEventListener('newMessage', event => {
|
||||||
let jid = event.detail.jid;
|
let jid = event.detail.jid;
|
||||||
Array.from(document.querySelectorAll('[data-jabberID="'+jid+'"]')).forEach(el => {
|
Array.from(document.querySelectorAll('[data-jabberID="' + jid + '"]')).forEach(el => {
|
||||||
el.parentElement.parentElement.classList.add('unread');
|
el.parentElement.parentElement.classList.add('unread');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -9,7 +9,12 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|||||||
window.addEventListener('read', (event) => {
|
window.addEventListener('read', (event) => {
|
||||||
if (event.detail && event.detail.resource && event.detail.resource['@id']) {
|
if (event.detail && event.detail.resource && event.detail.resource['@id']) {
|
||||||
const badge = document.querySelector(`solid-badge[data-src="${event.detail.resource['@id']}"]`);
|
const badge = document.querySelector(`solid-badge[data-src="${event.detail.resource['@id']}"]`);
|
||||||
if (badge) badge.parentElement.parentElement.classList.remove('unread');
|
if (badge) {
|
||||||
|
badge.parentElement.parentElement.classList.remove('unread');
|
||||||
|
const project = badge.parentElement.parentElement.querySelector('.unread');
|
||||||
|
if (project) project.classList.remove('unread');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user