Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6943 Rev 6944
Línea 20... Línea 20...
20
  gap: 0.5rem;
20
  gap: 0.5rem;
21
`
21
`
22
const StyledContactInfo = styled.div`
22
const StyledContactInfo = styled.div`
23
  display: flex;
23
  display: flex;
24
  flex-direction: column;
24
  flex-direction: column;
-
 
25
  cursor: pointer;
Línea 25... Línea 26...
25
 
26
 
26
  span {
27
  span {
27
    font-size: 0.9rem;
-
 
28
    cursor: pointer;
28
    font-size: 0.9rem;
29
    font-weight: bold;
29
    font-weight: bold;
30
    white-space: nowrap;
30
    white-space: nowrap;
31
    overflow: hidden;
31
    overflow: hidden;
32
    text-overflow: ellipsis;
32
    text-overflow: ellipsis;
33
    max-width: 20ch;
33
    max-width: 20ch;
34
  }
34
  }
-
 
35
`
-
 
36
const StyledTab = styled(Tab)`
-
 
37
  flex-grow: 1;
-
 
38
  color: var(--subtitle-color);
-
 
39
  font-weight: bold;
-
 
40
  padding: 0.5rem 1rem;
-
 
41
  min-height: auto;
-
 
42
  &.Mui-selected {
-
 
43
    color: 'var(--font-color)';
-
 
44
  }
Línea 35... Línea 45...
35
`
45
`
36
 
46
 
37
const Contacts = ({ selectedConversation, changeConversation }) => {
47
const Contacts = ({ selectedConversation, changeConversation }) => {
38
  const [showContactModal, setShowContactModal] = useState(false)
48
  const [showContactModal, setShowContactModal] = useState(false)
Línea 112... Línea 122...
112
        <Tabs
122
        <Tabs
113
          value={tab}
123
          value={tab}
114
          onChange={(e, newValue) => setTab(newValue)}
124
          onChange={(e, newValue) => setTab(newValue)}
115
          sx={{
125
          sx={{
116
            width: '100%',
126
            width: '100%',
-
 
127
            minHeight: 'auto',
117
            '& .MuiTabs-indicator': {
128
            '& .MuiTabs-indicator': {
118
              backgroundColor: 'var(--font-color)',
129
              backgroundColor: 'var(--font-color)',
119
            },
130
            },
120
          }}
131
          }}
121
        >
132
        >
122
          <Tab
-
 
123
            label="Personas"
133
          <StyledTab label="Personas" value="user" disableRipple />
124
            value="user"
-
 
125
            disableRipple
-
 
126
            sx={{
-
 
127
              flexGrow: 1,
-
 
128
              color: 'var(--subtitle-color)',
-
 
129
              fontWeight: 'bold',
-
 
130
              padding: '.5rem 1rem',
-
 
131
              '&.Mui-selected': {
-
 
132
                color: 'var(--font-color)',
-
 
133
              },
-
 
134
            }}
-
 
135
          />
-
 
136
          <Tab
-
 
137
            label="Grupos"
-
 
138
            value="group"
-
 
139
            disableRipple
-
 
140
            sx={{
-
 
141
              flexGrow: 1,
-
 
142
              color: 'var(--subtitle-color)',
134
          <StyledTab label="Grupos" value="group" disableRipple />
143
              padding: '.5rem 1rem',
-
 
144
              '&.Mui-selected': {
-
 
145
                color: 'var(--font-color)',
-
 
146
              },
-
 
147
            }}
-
 
148
          />
-
 
149
        </Tabs>
135
        </Tabs>
Línea 150... Línea 136...
150
 
136
 
151
        <div className="contact__search show">
137
        <div className="contact__search show">
152
          <SearchIcon />
138
          <SearchIcon />
Línea 202... Línea 188...
202
 
188
 
203
const Item = ({ contact, onClick }) => {
189
const Item = ({ contact, onClick }) => {
Línea 204... Línea 190...
204
  const labels = useSelector(({ intl }) => intl.labels)
190
  const labels = useSelector(({ intl }) => intl.labels)
205
 
191
 
206
  return (
192
  return (
207
    <StyledContact>
193
    <StyledContact onClick={() => onClick(contact)}>
208
      <Avatar
194
      <Avatar
209
        src={contact.image || '/images/users-group.png'}
195
        src={contact.image || '/images/users-group.png'}
210
        alt="image-image"
196
        alt="image-image"
211
        sx={{ width: 32, height: 32 }}
197
        sx={{ width: 32, height: 32 }}
212
      />
198
      />
213
      <StyledContactInfo>
199
      <StyledContactInfo>
214
        <span onClick={() => onClick(contact)}>{contact.name}</span>
200
        <span>{contact.name}</span>
215
        {contact.last_message && (
201
        {contact.last_message && (
216
          <p>
202
          <p>
217
            {`${contact.count_not_seen_messages} ${labels.new_messages} |
203
            {`${contact.count_not_seen_messages} ${labels.new_messages} |