Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 3484 Rev 3503
Línea 12... Línea 12...
12
import { feedTypes } from "../../../redux/feed/feed.types";
12
import { feedTypes } from "../../../redux/feed/feed.types";
13
import { BsHeart, BsHeartFill, BsTrash } from 'react-icons/bs'
13
import { BsHeart, BsHeartFill, BsTrash } from 'react-icons/bs'
14
import { RiShareForwardLine } from 'react-icons/ri'
14
import { RiShareForwardLine } from 'react-icons/ri'
15
import { TbSend } from "react-icons/tb";
15
import { TbSend } from "react-icons/tb";
16
import { BiDotsVerticalRounded, BiMessage, BiShareAlt } from "react-icons/bi";
16
import { BiDotsVerticalRounded, BiMessage, BiShareAlt } from "react-icons/bi";
17
import styles from "./feedTemplate.module.scss";
-
 
18
import styleFeed from "../share-feed/shareFeed.module.scss";
-
 
19
import { EmailIcon, EmailShareButton, FacebookIcon, FacebookShareButton, RedditIcon, RedditShareButton, TelegramIcon, TelegramShareButton, TwitterIcon, TwitterShareButton, WhatsappIcon, WhatsappShareButton } from "react-share";
17
import { EmailIcon, EmailShareButton, FacebookIcon, FacebookShareButton, RedditIcon, RedditShareButton, TelegramIcon, TelegramShareButton, TwitterIcon, TwitterShareButton, WhatsappIcon, WhatsappShareButton } from "react-share";
Línea 20... Línea 18...
20
 
18
 
21
// Redux actions
19
// Redux actions
22
import { openShareModal } from "../../../redux/share-modal/shareModal.actions";
20
import { openShareModal } from "../../../redux/share-modal/shareModal.actions";
23
import { addNotification } from "../../../redux/notification/notification.actions";
21
import { addNotification } from "../../../redux/notification/notification.actions";
24
import { deleteFeed } from "../../../redux/feed/feed.actions";
22
import { deleteFeed } from "../../../redux/feed/feed.actions";
25
import { useRef } from "react";
-
 
Línea 26... Línea 23...
26
import ExternalShareModal from "./ExternalShareModal";
23
import { useRef } from "react";
Línea 27... Línea 24...
27
 
24
 
28
const FeedTemplate = ({ feed, owner_shared, image }) => {
25
const FeedTemplate = ({ feed, owner_shared, image }) => {
Línea 71... Línea 68...
71
  const [likesState, setLikesState] = useState(feed_likes);
68
  const [likesState, setLikesState] = useState(feed_likes);
72
  const [isReadMoreActive, setIsReadMoreActive] = useState(false);
69
  const [isReadMoreActive, setIsReadMoreActive] = useState(false);
73
  const [showConfirmModal, setShowConfirmModal] = useState(false);
70
  const [showConfirmModal, setShowConfirmModal] = useState(false);
74
  const [displayOption, setDisplayOption] = useState(false)
71
  const [displayOption, setDisplayOption] = useState(false)
75
  const [shareOptions, setShareOptions] = useState(false)
72
  const [shareOptions, setShareOptions] = useState(false)
76
  const [shareModalProps, setShareModalProps] = useState({
-
 
77
    isShow: false,
-
 
78
    url: ''
-
 
79
  })
-
 
80
  const [show, setShow] = useState(false);
73
  const [show, setShow] = useState(false);
81
  const deleteButton = useRef();
74
  const deleteButton = useRef();
82
  const shareContainer = useRef(null);
75
  const shareContainer = useRef(null);
Línea 83... Línea 76...
83
 
76
 
Línea 206... Línea 199...
206
  };
199
  };
Línea 207... Línea 200...
207
 
200
 
208
  let commentsRender = null;
201
  let commentsRender = null;
209
  if (commentsState.length) {
202
  if (commentsState.length) {
210
    commentsRender = (
203
    commentsRender = (
211
      <div className={styles.commentSection}>
204
      <div className='commentSection'>
212
        <div className={`comment-sec comment-sec-${feed_unique}`}>
205
        <div className={`comment-sec comment-sec-${feed_unique}`}>
213
          <ul>
206
          <ul>
214
            {[...commentsState].reverse().map((commentData) => {
207
            {[...commentsState].reverse().map((commentData) => {
215
              const { unique } = commentData;
208
              const { unique } = commentData;
Línea 390... Línea 383...
390
      <Modal
383
      <Modal
391
        show={show}
384
        show={show}
392
        onHide={handleClose}
385
        onHide={handleClose}
393
        dialogClassName="modal-lg"
386
        dialogClassName="modal-lg"
394
      >
387
      >
395
        <div
-
 
396
          className="row"
388
        <div className="row">
397
        >
-
 
398
          <div
-
 
399
            className="col-md-8 col-sm-12 col-12"
389
          <div className="col-md-8 col-sm-12 col-12">
400
          >
-
 
401
            <Content
-
 
402
              showDescription
390
            <Content showDescription />
403
            />
-
 
404
          </div>
391
          </div>
405
          <div
-
 
406
            className="col-md-4 col-sm-12 col-12"
392
          <div className="col-md-4 col-sm-12 col-12">
407
          >
-
 
408
            <TopBar />
393
            <TopBar />
409
            <OwnerDescription />
394
            <OwnerDescription />
410
          </div>
395
          </div>
411
        </div>
396
        </div>
412
      </Modal>
397
      </Modal>
413
      <ExternalShareModal
-
 
414
        url={shareModalProps.url}
-
 
415
        isShow={shareModalProps.isShow}
-
 
416
        closeModal={() => setShareModalProps(prev => ({ ...prev, isShow: false }))}
-
 
417
      />
398
 
418
      <div className={`${styles.postContainer} ${feed_highlighted ? 'highlighted' : ''}`}>
399
      <div className={`$'postContainer'}${feed_highlighted ? 'highlighted' : ''}`}>
419
        <TopBar
-
 
420
          showDescription
400
        <TopBar showDescription />
421
        />
-
 
422
        <div
401
        <div
-
 
402
          onClick={() =>
423
          onClick={() => (owner_file_image || owner_file_video || owner_file_document) ? handleShow() : null}
403
            (owner_file_image || owner_file_video || owner_file_document)
-
 
404
              ? handleShow()
-
 
405
              : null
-
 
406
          }
424
        >
407
        >
425
          <Content
-
 
426
            showDescription
408
          <Content showDescription />
427
          />
-
 
428
        </div>
409
        </div>
429
        <div className="job-status-bar">
410
        <div className="job-status-bar">
430
          <ul className="reactions-list">
411
          <ul className="reactions-list">
431
            <li>
412
            <li>
432
              <button
413
              <button
Línea 500... Línea 481...
500
          <form
481
          <form
501
            className={`form-comment-feed-${feed_unique}`}
482
            className={`form-comment-feed-${feed_unique}`}
502
            data-feed-unique={feed_unique}
483
            data-feed-unique={feed_unique}
503
            onSubmit={handleSubmit(submitCommentHandler)}
484
            onSubmit={handleSubmit(submitCommentHandler)}
504
          >
485
          >
505
            <div className={styles.feedCommentContainer}>
486
            <div className='feedCommentContiner'>
506
              <img src={image} alt="User profile image" />
487
            <img src={image} alt="User profile image" />
507
              <input
488
            <input
508
                className={styles.commentInput}
489
              className='commentInput'
509
                type="text"
490
            type="text"
510
                name="comment"
491
            name="comment"
511
                id={`comment-${feed_unique}`}
492
            id={`comment-${feed_unique}`}
512
                maxLength="256"
493
            maxLength="256"
513
                placeholder="Escribe un comentario"
494
            placeholder="Escribe un comentario"
514
                ref={register({
495
            ref={register({
515
                  required: {
496
              required: {
516
                    value: "true",
497
                value: "true",
517
                    message: "El campo es requerido",
498
                message: "El campo es requerido",
518
                  },
499
              },
519
                })}
500
            })}
520
              />
501
              />
521
              <button className={`${styleFeed.shareIconContainer} ${styleFeed.iconActive}`} >
502
            <button className={`shareIconContainer iconActive`} >
522
                <TbSend className={styleFeed.shareIcon} />
503
              <TbSend className='shareIcon' />
523
              </button>
504
            </button>
524
            </div>
-
 
525
          </form>
-
 
526
          {
-
 
527
            errors.comment
-
 
528
            &&
-
 
529
            <FormErrorFeedback>{errors.comment.message}</FormErrorFeedback>
-
 
530
          }
-
 
531
        </div>
505
        </div>
-
 
506
      </form>
-
 
507
      {errors.comment &&
-
 
508
        <FormErrorFeedback>{errors.comment.message}</FormErrorFeedback>
-
 
509
      }
-
 
510
    </div>
532
      </div>
511
      </div >
533
      <ConfirmModal
512
  <ConfirmModal
534
        show={showConfirmModal}
513
    show={showConfirmModal}
535
        onClose={() => setShowConfirmModal(false)}
514
    onClose={() => setShowConfirmModal(false)}
536
        onAccept={deleteFeedHandler}
515
    onAccept={deleteFeedHandler}
537
        acceptLabel="Aceptar"
516
    acceptLabel="Aceptar"
538
      />
517
  />
539
    </React.Fragment>
518
    </React.Fragment >
540
  );
519
  );
541
};
520
};
Línea 542... Línea 521...
542
 
521