Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6831 Rev 6832
Línea 76... Línea 76...
76
  const [totalComments, setTotalComments] = useState(owner_comments)
76
  const [totalComments, setTotalComments] = useState(owner_comments)
77
  const [externalShare, setExternalShare] = useState(owner_external_shared)
77
  const [externalShare, setExternalShare] = useState(owner_external_shared)
78
  const [sharedState, setSharedState] = useState(owner_shared)
78
  const [sharedState, setSharedState] = useState(owner_shared)
79
  const [showComments, setShowComments] = useState(false)
79
  const [showComments, setShowComments] = useState(false)
80
  const [showModal, setShowModal] = useState(false)
80
  const [showModal, setShowModal] = useState(false)
81
  const labels = useSelector(({ labels }) => labels)
81
  const labels = useSelector(({ intl }) => intl.labels)
Línea 82... Línea 82...
82
 
82
 
83
  const reactionsOptions = [
83
  const reactionsOptions = [
84
    {
84
    {
85
      type: 'r',
85
      type: 'r',
Línea 246... Línea 246...
246
            <div
246
            <div
247
              className="d-inline-flex align-items-center"
247
              className="d-inline-flex align-items-center"
248
              style={{ gap: '5px' }}
248
              style={{ gap: '5px' }}
249
            >
249
            >
250
              {!!totalComments && (
250
              {!!totalComments && (
251
                <span>{`${totalComments} ${labels.COMMENTS?.toLowerCase()}`}</span>
251
                <span>{`${totalComments} ${labels.comments?.toLowerCase()}`}</span>
252
              )}
252
              )}
253
              {!!sharedState && (
253
              {!!sharedState && (
254
                <span>{`${sharedState} ${labels.SHARED?.toLowerCase()}`}</span>
254
                <span>{`${sharedState} ${labels.shared?.toLowerCase()}`}</span>
255
              )}
255
              )}
256
              {!!externalShare && (
256
              {!!externalShare && (
257
                <span>{`${externalShare} ${labels.SENDS?.toLowerCase()}`}</span>
257
                <span>{`${externalShare} ${labels.sends?.toLowerCase()}`}</span>
258
              )}
258
              )}
259
            </div>
259
            </div>
260
          </div>
260
          </div>
261
        )}
261
        )}
Línea 262... Línea 262...
262
 
262
 
263
        {!isShare && feed_content_type !== 'fast-survey' && (
263
        {!isShare && feed_content_type !== 'fast-survey' && (
264
          <div className="feed__buttons">
264
          <div className="feed__buttons">
265
            <WithReactionIcon withTitle />
265
            <WithReactionIcon withTitle />
266
            <InputOption
266
            <InputOption
267
              Icon={ChatOutlinedIcon}
267
              Icon={ChatOutlinedIcon}
268
              title={labels.COMMENT}
268
              title={labels.comment}
269
              color="gray"
269
              color="gray"
270
              onClick={displayCommentSection}
270
              onClick={displayCommentSection}
271
              withTitle
271
              withTitle
272
            />
272
            />
273
            <InputOption
273
            <InputOption
274
              Icon={ShareOutlinedIcon}
274
              Icon={ShareOutlinedIcon}
275
              title={labels.SHARE}
275
              title={labels.share}
276
              color="gray"
276
              color="gray"
277
              onClick={handleShare}
277
              onClick={handleShare}
278
              withTitle
278
              withTitle
279
            />
279
            />
Línea 305... Línea 305...
305
  sharedItem,
305
  sharedItem,
306
  type,
306
  type,
307
  voteUrl,
307
  voteUrl,
308
}) => {
308
}) => {
309
  const [isReadMoreActive, setIsReadMoreActive] = useState(false)
309
  const [isReadMoreActive, setIsReadMoreActive] = useState(false)
310
  const labels = useSelector(({ labels }) => labels)
310
  const labels = useSelector(({ intl }) => intl.labels)
Línea 311... Línea 311...
311
 
311
 
Línea 312... Línea 312...
312
  const readMoreHandler = () => setIsReadMoreActive(!isReadMoreActive)
312
  const readMoreHandler = () => setIsReadMoreActive(!isReadMoreActive)
313
 
313
 
Línea 318... Línea 318...
318
      const shortenedText = parse(`${shortenedString}... `)
318
      const shortenedText = parse(`${shortenedString}... `)
319
      return (
319
      return (
320
        <>
320
        <>
321
          {isReadMoreActive ? fullText : shortenedText}
321
          {isReadMoreActive ? fullText : shortenedText}
322
          <span className="cursor-pointer" onClick={readMoreHandler}>
322
          <span className="cursor-pointer" onClick={readMoreHandler}>
323
            {isReadMoreActive ? labels.READ_LESS : labels.READ_MORE}
323
            {isReadMoreActive ? labels.read_less : labels.read_more}
324
          </span>
324
          </span>
325
        </>
325
        </>
326
      )
326
      )
327
    }
327
    }
328
    return <p>{fullText}</p>
328
    return <p>{fullText}</p>
Línea 361... Línea 361...
361
      {video && (
361
      {video && (
362
        <video src={video} controls poster={imagePreview} preload="none" />
362
        <video src={video} controls poster={imagePreview} preload="none" />
363
      )}
363
      )}
364
      {document && (
364
      {document && (
365
        <a href={document} target="_blank" rel="noreferrer">
365
        <a href={document} target="_blank" rel="noreferrer">
366
          {labels.DOWNLOAD}
366
          {labels.download}
367
        </a>
367
        </a>
368
      )}
368
      )}
369
      {sharedItem.name && (
369
      {sharedItem.name && (
370
        <div className="py-3 px-md-3">
370
        <div className="py-3 px-md-3">
371
          <Feed
371
          <Feed
Línea 395... Línea 395...
395
  feedUnique = '',
395
  feedUnique = '',
396
}) => {
396
}) => {
397
  const [showConfirmModal, setShowConfirmModal] = useState(false)
397
  const [showConfirmModal, setShowConfirmModal] = useState(false)
398
  const [displayOption, setDisplayOption] = useState(false)
398
  const [displayOption, setDisplayOption] = useState(false)
399
  const deleteButton = useRef()
399
  const deleteButton = useRef()
-
 
400
  const labels = useSelector(({ intl }) => intl.labels)
400
  const dispatch = useDispatch()
401
  const dispatch = useDispatch()
401
  const labels = useSelector(({ labels }) => labels)
-
 
Línea 402... Línea 402...
402
 
402
 
Línea 403... Línea 403...
403
  const handleShowConfirmModal = () => setShowConfirmModal(!showConfirmModal)
403
  const handleShowConfirmModal = () => setShowConfirmModal(!showConfirmModal)
404
 
404
 
Línea 461... Línea 461...
461
                  className="option-btn"
461
                  className="option-btn"
462
                  onClick={handleShowConfirmModal}
462
                  onClick={handleShowConfirmModal}
463
                  ref={deleteButton}
463
                  ref={deleteButton}
464
                >
464
                >
465
                  <i className="fa fa-trash-o mr-1" />
465
                  <i className="fa fa-trash-o mr-1" />
466
                  {labels.DELETE}
466
                  {labels.delete}
467
                </button>
467
                </button>
468
              </li>
468
              </li>
469
            </ul>
469
            </ul>
470
          </div>
470
          </div>
471
          <ConfirmModal
471
          <ConfirmModal
472
            show={showConfirmModal}
472
            show={showConfirmModal}
473
            onClose={() => handleShowConfirmModal(false)}
473
            onClose={() => handleShowConfirmModal(false)}
474
            onAccept={deleteFeedHandler}
474
            onAccept={deleteFeedHandler}
475
            acceptLabel={labels.ACCEPT}
475
            acceptLabel={labels.accept}
476
          />
476
          />
477
        </div>
477
        </div>
478
      )}
478
      )}
479
    </div>
479
    </div>
480
  )
480
  )