Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 14150 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 14150 Rev 14176
Línea 1... Línea 1...
1
import { async } from "postcss-js";
1
import { async } from 'postcss-js'
2
import React, { useCallback } from "react";
2
import React, { useCallback } from 'react'
3
import { useState, useEffect } from "react";
3
import { useState, useEffect } from 'react'
4
import { axios } from "../../utils";
4
import { axios } from '../../utils'
5
import Contacts from "./contacts/Contacts";
5
import Contacts from './contacts/Contacts'
6
import NotificationAlert from "../../shared/notification/NotificationAlert";
6
import NotificationAlert from '../../shared/notification/NotificationAlert'
7
import Groups from "./groups/Groups";
7
import Groups from './groups/Groups'
8
import PersonalChat from "./personal-chat/PersonalChat";
8
import PersonalChat from './personal-chat/PersonalChat'
Línea 9... Línea 9...
9
 
9
 
Línea 10... Línea 10...
10
const notifyAudio = new Audio("/audio/chat.mp3");
10
const notifyAudio = new Audio('/audio/chat.mp3')
222
                        className="text-white"
222
												className="text-white"
223
                      >
223
											>
224
                        Chat
224
                        Chat
225
                      </a>
225
											</a>
226
                    </div>
226
										</div>
227
                    <span
227
										<span
228
                      className="min localhost-icon-minus-1"
228
											className="min localhost-icon-minus-1"
229
                      id="mute-sound"
229
											id="mute-sound"
230
                    >
230
										>
231
                      <i
231
											<i
232
                        className={`icon ${isMuted ? "icon-volume-off" : "icon-volume-2"
232
												className={`icon ${isMuted ? 'icon-volume-off' : 'icon-volume-2'
233
                          } text-20`}
233
												} text-20`}
234
                        aria-hidden="true"
234
												aria-hidden="true"
235
                        onClick={handleMute}
235
												onClick={handleMute}
236
                      ></i>
236
											></i>
237
                    </span>
237
										</span>
238
                    {/* <span
238
										{/* <span
239
                      className="min localhost-icon-minus-1"
239
                      className="min localhost-icon-minus-1"
240
                      id="new-chat-group"
240
                      id="new-chat-group"
241
                      style={{ marginRight: "5%" }}
241
                      style={{ marginRight: "5%" }}
242
                      title="Crear grupo"
242
                      title="Crear grupo"
243
                    >
243
                    >
244
                      <i className="fa fa-edit"></i>
244
                      <i className="fa fa-edit"></i>
245
                    </span> */}
245
                    </span> */}
246
                  </div>
246
									</div>
247
                  <div
247
									<div
248
                    id="showhidechatlist"
248
										id="showhidechatlist"
249
                    style={{ display: isChatOpen ? "block" : "none" }}
249
										style={{ display: isChatOpen ? 'block' : 'none' }}
250
                  >
250
									>
251
                    <div
251
										<div
252
                      className="drupalchat_search_main chatboxinput"
252
											className="drupalchat_search_main chatboxinput"
253
                      style={{ background: "#f9f9f9" }}
253
											style={{ background: '#f9f9f9' }}
254
                    >
254
										>
255
                      <div
255
											<div
256
                        className="drupalchat_search"
256
												className="drupalchat_search"
257
                        style={{ height: "auto" }}
257
												style={{ height: 'auto' }}
258
                      >
258
											>
259
                        <input
259
												<input
260
                          className="drupalchat_searchinput live-search-box"
260
													className="drupalchat_searchinput live-search-box"
261
                          id="live-search-box"
261
													id="live-search-box"
262
                          placeholder="Buscar"
262
													placeholder="Buscar"
263
                          size="24"
263
													size="24"
264
                          type="text"
264
													type="text"
265
                          name='search'
265
													name='search'
266
                          value={search}
266
													value={search}
267
                          onChange={e => {
267
													onChange={e => {
268
                            setSearch(e.target.value || '')
268
														setSearch(e.target.value || '')
269
                          }}
269
													}}
270
                        />
270
												/>
271
                        <button
271
												<button
272
                          className="searchbutton"
272
													className="searchbutton"
273
                          id="searchbutton"
273
													id="searchbutton"
274
                          title=""
274
													title=""
275
                          style={{
275
													style={{
276
                            height: "30px",
276
														height: '30px',
277
                            border: "none",
277
														border: 'none',
278
                            margin: "0px",
278
														margin: '0px',
279
                            paddingRight: "13px",
279
														paddingRight: '13px',
280
                            verticalAlign: "middle",
280
														verticalAlign: 'middle',
281
                          }}
281
													}}
282
                          type="submit"
282
													type="submit"
283
                        ></button>
283
												></button>
284
                        <div
284
												<div
285
                          id="search_result"
285
													id="search_result"
286
                          style={{
286
													style={{
287
                            textAlign: "center",
287
														textAlign: 'center',
288
                            fontSize: "11px",
288
														fontSize: '11px',
289
                            display: "none",
289
														display: 'none',
290
                          }}
290
													}}
291
                        >
291
												>
292
                          Sin resultados
292
                          Sin resultados
293
                        </div>
293
												</div>
294
                      </div>
294
											</div>
295
                    </div>
295
										</div>
296
                    <div
296
										<div
297
                      className="drupalchat_search_main chatboxinput"
297
											className="drupalchat_search_main chatboxinput"
298
                      style={{ background: "#f9f9f9" }}
298
											style={{ background: '#f9f9f9' }}
299
                    >
299
										>
300
                      <div
300
											<div
301
                        style={{
301
												style={{
302
                          width: "50%",
302
													width: '50%',
303
                          float: "left",
303
													float: 'left',
304
                          display: "inline-block",
304
													display: 'inline-block',
305
                          padding: "5px",
305
													padding: '5px',
306
                          textAlign: "center",
306
													textAlign: 'center',
307
                          fontSize: "14px",
307
													fontSize: '14px',
308
                        }}
308
												}}
309
                      >
309
											>
310
                        <a
310
												<a
311
                          href="#"
311
													href="#"
312
                          className="blue-color chat-contacts"
312
													className="blue-color chat-contacts"
313
                          onClick={(e) => {
313
													onClick={(e) => {
314
                            e.preventDefault();
314
														e.preventDefault()
315
                            handleChangeTab("user");
315
														handleChangeTab('user')
316
                          }}
316
													}}
317
                        >
317
												>
318
                          Contactos
318
                          Contactos
319
                        </a>
319
												</a>
320
                      </div>
320
											</div>
321
                      <div
321
											<div
322
                        style={{
322
												style={{
323
                          width: "50%",
323
													width: '50%',
324
                          display: "inline-block",
324
													display: 'inline-block',
325
                          padding: "5px",
325
													padding: '5px',
326
                          textAlign: "center",
326
													textAlign: 'center',
327
                          fontSize: "14px",
327
													fontSize: '14px',
328
                        }}
328
												}}
329
                      >
329
											>
330
                        <a
330
												<a
331
                          href="#"
331
													href="#"
332
                          className="chat-groups"
332
													className="chat-groups"
333
                          onClick={(e) => {
333
													onClick={(e) => {
334
                            e.preventDefault();
334
														e.preventDefault()
335
                            handleChangeTab("group");
335
														handleChangeTab('group')
336
                          }}
336
													}}
337
                        >
337
												>
338
                          Grupos
338
                          Grupos
339
                        </a>
339
												</a>
340
                      </div>
340
											</div>
341
                    </div>
341
										</div>
342
                    <div
342
										<div
343
                      className="contact-list chatboxcontent"
343
											className="contact-list chatboxcontent"
344
                      style={{
344
											style={{
345
                        display: activeTab === "user" ? "block" : "none",
345
												display: activeTab === 'user' ? 'block' : 'none',
346
                      }}
346
											}}
347
                    >
347
										>
348
                      <Contacts
348
											<Contacts
349
                        contacts={filtredContacts}
349
												contacts={filtredContacts}
350
                        onOpenConversation={handleOpenConversation}
350
												onOpenConversation={handleOpenConversation}
351
                      />
351
											/>
352
                    </div>
352
										</div>
353
                    <div
353
										<div
354
                      className="group-list chatboxcontent"
354
											className="group-list chatboxcontent"
355
                      style={{
355
											style={{
356
                        display: activeTab === "group" ? "block" : "none",
356
												display: activeTab === 'group' ? 'block' : 'none',
357
                      }}
357
											}}
358
                    >
358
										>
359
                      <ul id="group-list-ul" className="live-search-list-group">
359
											<ul id="group-list-ul" className="live-search-list-group">
360
                        <Groups
360
												<Groups
361
                          groups={filtredGroups}
361
													groups={filtredGroups}
362
                          onOpenConversation={handleOpenConversation}
362
													onOpenConversation={handleOpenConversation}
363
                        />
363
												/>
364
                      </ul>
364
											</ul>
365
                    </div>
365
										</div>
366
                    <div
366
										<div
367
                      className="group-contacts-list chatboxcontent"
367
											className="group-contacts-list chatboxcontent"
368
                      style={{ display: "none" }}
368
											style={{ display: 'none' }}
369
                    >
369
										>
370
                      <div style={{ textAlign: "center", fontSize: "13px" }}>
370
											<div style={{ textAlign: 'center', fontSize: '13px' }}>
371
                        Integrantes del grupo
371
                        Integrantes del grupo
372
                      </div>
372
											</div>
373
                      <ul
373
											<ul
374
                        id="contact-group-list-ul"
374
												id="contact-group-list-ul"
375
                        className="live-search-list"
375
												className="live-search-list"
376
                      ></ul>
376
											></ul>
377
                    </div>
377
										</div>
378
                  </div>
378
									</div>
379
                </div>
379
								</div>
380
              </li>
380
							</li>
381
            </ul>
381
						</ul>
382
          </div>
382
					</div>
383
        </div>
383
				</div>
384
      </div>
384
			</div>
385
      <div style={{ display: "flex" }}>
385
			<div className="personal_chat-container">
386
        {activeChats.map((entity, index) => (
386
				{activeChats.map((entity, index) => (
387
          <PersonalChat
387
					<PersonalChat
388
            key={entity.id}
388
						key={entity.id}
389
            entity={entity}
389
						entity={entity}
390
            index={index}
390
						index={index}
391
            onClose={handleCloseChat}
391
						onClose={handleCloseChat}
392
            onMinimize={handleMinimizeChat}
392
						onMinimize={handleMinimizeChat}
393
            onRead={handleReadChat}
393
						onRead={handleReadChat}
394
          />
394
					/>
395
        ))}
395
				))}
396
      </div>
396
			</div>
397
      <NotificationAlert />
397
			<NotificationAlert />
398
    </React.Fragment>
398
		</React.Fragment>
399
  ) : (
399
	) : (
400
    ""
400
		''
Línea 401... Línea 401...
401
  );
401
	)