Merge branch 'release/core-0.12' into feature/core-0.12

This commit is contained in:
Jean-Baptiste Pasquier
2020-09-24 11:31:29 +02:00
31 changed files with 1334 additions and 50 deletions

View File

@ -71,10 +71,12 @@ solid-router#navbar-router(default-route='dashboard')
div.divider
if endpoints.projects || (endpoints.get && endpoints.get.projects)
div
solid-link(next='admin-project-list')
solid-link
//- (next='admin-project-list')
div.menu
div.menu-chevron
div.menu-icon.icon-arrow-right-circle
div.menu-icon
//- div.menu-icon.icon-arrow-right-circle
div.menu-label Projets
div.menu-icon.icon-folder-alt
solid-route(name='project', rdf-type='hd:project', use-id='', hidden)
@ -98,10 +100,12 @@ solid-router#navbar-router(default-route='dashboard')
div.divider
if endpoints.circles || (endpoints.get && endpoints.get.circles)
div
solid-link(next='admin-circle-list')
solid-link
//- (next='admin-circle-list')
div.menu
div.menu-chevron
div.menu-icon.icon-arrow-right-circle
div.menu-icon
//- div.menu-icon.icon-arrow-right-circle
div.menu-label Cercles
div.menu-icon.icon-folder-alt
solid-route(name='circle', rdf-type='hd:circle', use-id='', hidden)

View File

@ -0,0 +1,11 @@
document.addEventListener("DOMContentLoaded", () => {
const menuWrappers = Array.from(document.querySelectorAll(".menu-wrapper"));
//- Toggle sub-menus
menuWrappers.forEach(menuWrapper => {
const menu = menuWrapper.querySelector(".menu");
menu.addEventListener("click", e => {
menuWrapper.classList.toggle("is-closed");
});
});
});

View File

@ -1,7 +1,7 @@
document.addEventListener("DOMContentLoaded", function (event) {
window.addEventListener('newMessage', event => {
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');
});
});
@ -9,7 +9,12 @@ document.addEventListener("DOMContentLoaded", function (event) {
window.addEventListener('read', (event) => {
if (event.detail && event.detail.resource && 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');
}
}
});
});

View File

@ -61,7 +61,7 @@ solid-dashboard section {
position: sticky;
top: 0;
overflow-x: hidden;
overflow-y: auto;
overflow-y: scroll;
}
&.jsLeftMenu {

View File

@ -13,13 +13,21 @@
solid-router {
.menu-wrapper {
&.is-closed {
.sub-menu {
display: none;
.menu-icon.icon-arrow-up {
visibility: hidden;
}
@include breakpoint(lg) {
.menu-icon.icon-arrow-up {
visibility: visible;
}
&.is-closed {
.sub-menu {
display: none;
}
.menu-chevron {
transform: rotate(180deg);
.menu-chevron {
transform: rotate(180deg);
}
}
}
}

View File

@ -38,6 +38,21 @@
text-align: left;
}
.user-thumb__send {
position: relative;
bottom: 7px;
left: -5px;
solid-link {
@include icon('speech');
&::before {
display: inline-block;
color: #FF6765;
}
}
}
.user-thumb__admin:not(:empty) {
display: block !important;
@extend %tag-admin;