Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5332 | Rev 5344 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5332 Rev 5334
Línea 9... Línea 9...
9
import styled from 'styled-components'
9
import styled from 'styled-components'
10
import Datetime from 'react-datetime'
10
import Datetime from 'react-datetime'
11
import SearchIcon from '@mui/icons-material/Search'
11
import SearchIcon from '@mui/icons-material/Search'
12
import Emojione from './emojione/Emojione'
12
import Emojione from './emojione/Emojione'
13
import SendFileModal from './send-file-modal/SendFileModal'
13
import SendFileModal from './send-file-modal/SendFileModal'
14
import MessageTemplate from './messageTemplate/MessageTemplate'
-
 
15
import ConfirmModal from '../../../shared/confirm-modal/ConfirmModal'
14
import ConfirmModal from '../../../shared/confirm-modal/ConfirmModal'
16
import EmptySection from '../../../shared/empty-section/EmptySection'
15
import EmptySection from '../../../shared/empty-section/EmptySection'
17
import FormErrorFeedback from '../../../shared/form-error-feedback/FormErrorFeedback'
16
import FormErrorFeedback from '../../../shared/form-error-feedback/FormErrorFeedback'
Línea 18... Línea 17...
18
 
17
 
-
 
18
import 'react-datetime/css/react-datetime.css'
Línea 19... Línea 19...
19
import 'react-datetime/css/react-datetime.css'
19
import ChatList from '../../../components/chat/ChatList'
20
 
20
 
21
const StyledShowOptions = styled.div`
21
const StyledShowOptions = styled.div`
22
  height: 342px;
22
  height: 342px;
Línea 264... Línea 264...
264
    textAreaEl.current && textAreaEl.current.focus()
264
    textAreaEl.current && textAreaEl.current.focus()
265
  } */
265
  } */
Línea 266... Línea 266...
266
 
266
 
Línea 267... Línea -...
267
  const displayConferenceModal = () => setShowConferenceModal(!showConferenceModal)
-
 
268
 
-
 
269
  const messagesRender = () => {
-
 
270
    return (
-
 
271
      <>
-
 
272
        {currentPage < lastPage ? <li ref={loader}>Cargando...</li> : ''}
-
 
273
        {oldMessages.map((message) => (
-
 
274
          <MessageTemplate
-
 
275
            time={message.time}
-
 
276
            key={message.id}
-
 
277
            message={message} />
-
 
278
        ))}
-
 
279
        {messages.map((message) => (
-
 
280
          <MessageTemplate
-
 
281
            time={message.time}
-
 
282
            key={message.id}
-
 
283
            message={message} />
-
 
284
        ))}
-
 
285
      </>
-
 
286
    )
-
 
287
  }
267
  const displayConferenceModal = () => setShowConferenceModal(!showConferenceModal)
288
 
268
 
289
  const loadPersonsAvailable = async () => {
269
  const loadPersonsAvailable = async () => {
290
    await axios.get(url_get_contacts_availables_for_group).then((response) => {
270
    await axios.get(url_get_contacts_availables_for_group).then((response) => {
291
      const resData = response.data
271
      const resData = response.data
Línea 505... Línea 485...
505
          <img src={image} alt="avatar-image" />
485
          <img src={image} alt="avatar-image" />
506
          <div className="info-content">
486
          <div className="info-content">
507
            <a href={profile} target="_blank" rel="noreferrer">{name}</a>
487
            <a href={profile} target="_blank" rel="noreferrer">{name}</a>
508
            {type === 'user' && <small className={online ? 'online' : 'offline'} >{online ? 'En línea' : 'Desconectado'}</small>}
488
            {type === 'user' && <small className={online ? 'online' : 'offline'} >{online ? 'En línea' : 'Desconectado'}</small>}
509
          </div>
489
          </div>
510
          <div className="options">
490
          <div className="options ml-auto">
511
            <i className="cursor-pointer fa fa-gear"
491
            <i className="cursor-pointer fa fa-gear"
512
              onClick={() => showOptions(type === 'user' ? OPTIONS.CONFERENCE : OPTIONS.GROUP)} />
492
              onClick={() => showOptions(type === 'user' ? OPTIONS.CONFERENCE : OPTIONS.GROUP)} />
513
            <i className={'cursor-pointer fa fa-minus-circle'} onClick={handleActive} />
493
            <i className={'cursor-pointer fa fa-minus-circle'} onClick={handleActive} />
514
            <i className="cursor-pointer fa fa-times-circle" onClick={handleCloseChat} />
494
            <i className="cursor-pointer fa fa-times-circle" onClick={handleCloseChat} />
515
          </div>
495
          </div>
516
        </div>
496
        </div>
Línea 517... Línea 497...
517
 
497
 
Línea 518... Línea 498...
518
        <div className="panel-body" style={{ display: !minimized ? 'block' : 'none' }}>
498
        <div className="panel-body" style={{ display: !minimized ? 'block' : 'none' }}>
519
 
499
 
520
        {optionTab
500
          {optionTab
521
          ? <StyledShowOptions>
501
            ? <StyledShowOptions>
522
            <span className="optionBack" onClick={() => showOptions()}>
502
              <span className="optionBack" onClick={() => showOptions()}>
523
              <i className="fa icon-arrow-left" />
503
                <i className="fa icon-arrow-left" />
524
            </span>
504
              </span>
525
            <div className="optionsTab">
505
              <div className="optionsTab">
526
              {tabsOptions[optionTab]}
506
                {tabsOptions[optionTab]}
-
 
507
              </div>
527
            </div>
508
            </StyledShowOptions>
528
          </StyledShowOptions>
509
            : <>
529
          : <div className="chat-conversation">
510
            <ChatList
530
            <div className="reverseChatBox" ref={conversationListEl}>
511
              messages={[...oldMessages, ...messages]}
-
 
512
              currentPage={currentPage}
531
              <ul className="conversation-list chatboxcontent">
513
              lastPage={lastPage}
532
                {messagesRender()}
514
              conversationList={conversationListEl}
533
              </ul>
-
 
534
            </div>
515
              loader={loader}
535
 
516
            />
Línea 536... Línea 517...
536
            <div className="wchat-footer wchat-chat-footer">
517
            <div className="wchat-footer wchat-chat-footer">
537
              <div id="chatFrom" className="chatFrom">
518
              <div id="chatFrom" className="chatFrom">
Línea 575... Línea 556...
575
                  </div>
556
                  </div>
576
                </div>
557
                </div>
Línea 577... Línea 558...
577
 
558
 
578
              </div>
559
              </div>
579
            </div>
-
 
580
 
560
            </div>
581
          </div>
561
            </>
582
        }
562
          }
Línea 583... Línea 563...
583
        </div>
563
        </div>
584
 
564
 
585
      </div>
565
      </div>