Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1513 Rev 1514
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
-
 
3
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
-
 
4
import { useDispatch, useSelector } from 'react-redux'
2
import { useDispatch, useSelector } from 'react-redux'
-
 
3
import { Avatar, Box } from '@mui/material'
-
 
4
import {
-
 
5
  Image,
-
 
6
  Create,
-
 
7
  Article,
-
 
8
  PostAdd,
-
 
9
  Subscriptions
-
 
10
} from '@mui/icons-material'
5
import styled from 'styled-components'
11
import styled from 'styled-components'
Línea 6... Línea -...
6
 
-
 
7
import Avatar from '@mui/material/Avatar'
-
 
8
import ImageIcon from '@mui/icons-material/Image'
12
 
9
import CreateIcon from '@mui/icons-material/Create'
-
 
10
import ArticleIcon from '@mui/icons-material/Article'
-
 
11
import PostAddIcon from '@mui/icons-material/PostAdd'
13
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
12
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
-
 
13
 
-
 
14
import Input from '../../../UI/Input'
-
 
Línea 15... Línea 14...
15
import ShareOption from './ShareOption'
14
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
16
 
15
 
17
import styles from './ShareComponent.module.scss'
16
import Input from 'components/UI/Input'
Línea 18... Línea 17...
18
import WidgetWrapper from 'components/widgets/WidgetLayout'
17
import WidgetWrapper from 'components/widgets/WidgetLayout'
19
import { Box } from '@mui/material'
18
import ShareOption from './ShareOption'
20
 
19
 
21
const StyledInput = styled(Input)`
20
const StyledInput = styled(Input)`
Línea 34... Línea 33...
34
 
33
 
35
const ShareComponent = ({ feedType, postUrl = '', image = '' }) => {
34
const ShareComponent = ({ feedType, postUrl = '', image = '' }) => {
36
  const labels = useSelector(({ intl }) => intl.labels)
35
  const labels = useSelector(({ intl }) => intl.labels)
Línea 37... Línea 36...
37
  const dispatch = useDispatch()
36
  const dispatch = useDispatch()
38
 
37
 
39
  const onClickHandler = (postType) => {
-
 
Línea 40... Línea 38...
40
    dispatch(openShareModal(postUrl, postType, feedType))
38
  const onClickHandler = (postType) =>
41
  }
39
    dispatch(openShareModal(postUrl, postType, feedType))
42
 
40
 
43
  return (
41
  return (
44
    <WidgetWrapper p={1}>
42
    <WidgetWrapper p={1}>
45
      <Box display='flex' alignItems='center' gap={1}>
43
      <Box display='flex' alignItems='center' gap={1} mb={1}>
46
        <Avatar
44
        <Avatar
47
          src={image}
45
          src={image}
Línea 52... Línea 50...
52
        />
50
        />
Línea 53... Línea 51...
53
 
51
 
54
        <StyledInput
52
        <StyledInput
55
          type='text'
53
          type='text'
56
          readOnly
54
          readOnly
57
          icon={CreateIcon}
55
          icon={Create}
58
          placeholder={labels.what_are_you_thinking}
56
          placeholder={labels.what_are_you_thinking}
59
          onClick={() => onClickHandler(shareModalTypes.POST)}
57
          onClick={() => onClickHandler(shareModalTypes.POST)}
60
        />
58
        />
Línea 61... Línea 59...
61
      </Box>
59
      </Box>
62
 
60
 
63
      <div className={styles.share__options}>
61
      <Box display='flex' gap={1}>
64
        <ShareOption
62
        <ShareOption
65
          icon={ImageIcon}
63
          icon={Image}
66
          title={labels.image}
64
          title={labels.image}
67
          color='#7405f9'
65
          color='#7405f9'
68
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
66
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
69
        />
67
        />
70
        <ShareOption
68
        <ShareOption
71
          icon={SubscriptionsIcon}
69
          icon={Subscriptions}
72
          title={labels.video}
70
          title={labels.video}
73
          color='#E7A33E'
71
          color='#E7A33E'
74
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
72
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
75
        />
73
        />
76
        <ShareOption
74
        <ShareOption
77
          icon={ArticleIcon}
75
          icon={Article}
78
          title={labels.document}
76
          title={labels.document}
79
          color='#C0C8CD'
77
          color='#C0C8CD'
80
          onClick={() => onClickHandler(shareModalTypes.FILE)}
78
          onClick={() => onClickHandler(shareModalTypes.FILE)}
81
        />
79
        />
82
        <ShareOption
80
        <ShareOption
83
          icon={PostAddIcon}
81
          icon={PostAdd}
84
          title={labels.write}
82
          title={labels.write}
85
          color='#7FC15E'
83
          color='#7FC15E'
86
          onClick={() => onClickHandler(shareModalTypes.POST)}
84
          onClick={() => onClickHandler(shareModalTypes.POST)}
87
        />
85
        />
88
      </div>
86
      </Box>
89
    </WidgetWrapper>
87
    </WidgetWrapper>
Línea 90... Línea 88...
90
  )
88
  )