mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-10-31 18:24:27 +00:00 
			
		
		
		
	Notify calls in sidebar
This commit is contained in:
		| @@ -86,6 +86,24 @@ body.sidebar-collapse .sidebar-menu { | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | body.sidebar-collapse .main-sidebar .memberships-list .subinfo { | ||||||
|  | 	display: none; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | body.sidebar-collapse .main-sidebar .memberships-list li:hover .subinfo { | ||||||
|  | 	display: block; | ||||||
|  | 	background: #2c3b41; | ||||||
|  | 	position: absolute; | ||||||
|  | 	width: 180px; | ||||||
|  | 	left: 50px; | ||||||
|  | 	padding-top: 5px; | ||||||
|  | 	padding-bottom: 5px; | ||||||
|  | 	border-bottom-right-radius: 4px; | ||||||
|  | 	margin: 7px -3px; | ||||||
|  | 	padding-left: 20px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Conversations entries |  * Conversations entries | ||||||
|  */ |  */ | ||||||
| @@ -120,24 +138,28 @@ add left border | |||||||
| 	font-size: 80%; | 	font-size: 80%; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .main-sidebar .conversation_memberhsip.with-call .subinfo { | ||||||
| body.sidebar-collapse .main-sidebar .memberships-list .subinfo { |  | ||||||
| 	display: none; | 	display: none; | ||||||
| } | } | ||||||
|  |  | ||||||
| body.sidebar-collapse .main-sidebar .memberships-list li:hover .subinfo { |  | ||||||
| 	display: block; |  | ||||||
| 	background: #2c3b41; | .main-sidebar .call_notice { | ||||||
| 	position: absolute; | 	background-color: #db8b0b82; | ||||||
| 	width: 180px; | 	margin-bottom: 5px; | ||||||
| 	left: 50px; |  | ||||||
| 	padding-top: 5px; |  | ||||||
| 	padding-bottom: 5px; |  | ||||||
| 	border-bottom-right-radius: 4px; |  | ||||||
| 	margin: 7px -3px; |  | ||||||
| 	padding-left: 20px; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .main-sidebar .call_notice a { | ||||||
|  | 	padding-top: 0px; | ||||||
|  | 	padding-bottom: 0px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .main-sidebar .call_notice a:hover { | ||||||
|  | 	background-color: #db8b0b82 !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Conversations |  * Conversations | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -576,6 +576,25 @@ const SidebarMain = { | |||||||
| 			innerHTML: timeDiffToStr(conv.last_active) | 			innerHTML: timeDiffToStr(conv.last_active) | ||||||
| 		}); | 		}); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 		// Check if there is an ongoing call on the conversation | ||||||
|  | 		if(conv.has_call_now) { | ||||||
|  | 			 | ||||||
|  | 			li.classList.add("with-call"); | ||||||
|  |  | ||||||
|  | 			let callLi = createElem2({ | ||||||
|  | 				appendTo: target, | ||||||
|  | 				type: "li", | ||||||
|  | 				class: "call_notice" | ||||||
|  | 			}); | ||||||
|  |  | ||||||
|  | 			let a = createElem2({ | ||||||
|  | 				appendTo: callLi, | ||||||
|  | 				type: "a", | ||||||
|  | 				onclick: () => CallsController.Open(conv), | ||||||
|  | 				innerHTML: "<i class='fa fa-phone'></i> <span>Ongoing call</span>" | ||||||
|  | 			}); | ||||||
|  | 		} | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user