From 8dc337a00c23e1683d71fd5bc3e5b0d298b40a1e Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 9 Apr 2020 12:02:46 +0200 Subject: [PATCH] Remove label from sidebar --- assets/css/components/sidebar.css | 18 ++++++++++++++++++ assets/js/components/sidebar/main.js | 9 +++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/assets/css/components/sidebar.css b/assets/css/components/sidebar.css index d2732711..b9bd5466 100644 --- a/assets/css/components/sidebar.css +++ b/assets/css/components/sidebar.css @@ -90,6 +90,24 @@ body.sidebar-collapse .sidebar-menu { * Conversations entries */ +/** +add left border +.main-sidebar .memberships-list .conversation_memberhsip.has-unread-msg::before { + border: 2px white solid; + border-radius: 2px 0px 0px 2px; + content: " "; + position: absolute; + background-color: white; + height: 100%; + left: 1%; +} +*/ + +.main-sidebar .memberships-list .conversation_memberhsip.has-unread-msg { + background-color: #00a65a30; +} + + .main-sidebar .memberships-list .conversation_memberhsip a { padding: 5px 5px 5px 15px; } diff --git a/assets/js/components/sidebar/main.js b/assets/js/components/sidebar/main.js index e3489288..7e17a48f 100644 --- a/assets/js/components/sidebar/main.js +++ b/assets/js/components/sidebar/main.js @@ -75,12 +75,12 @@ const SidebarMain = { this.addSearchForm(section); // User memberships - createElem2({ + /*createElem2({ appendTo: section, type: "div", class: "intermediate-label hide-on-collapse", innerHTML: "FRIENDS & GROUPS" - }); + });*/ let userMemberships = createElem2({ appendTo: section, type: "div", @@ -544,6 +544,11 @@ const SidebarMain = { }); li.setAttribute("data-membership-conv-id", conv.ID) + // Check for unread messages + if(!conv.saw_last_message) { + li.classList.add("has-unread-msg"); + } + let a = createElem2({ appendTo: li, type: "a",