Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 2764 Rev 2765
Línea 56... Línea 56...
56
  const handleLike = () => {
56
  const handleLike = () => {
57
    setIsLiked(!isLiked)
57
    setIsLiked(!isLiked)
58
    setIsShow(!isShow)
58
    setIsShow(!isShow)
59
  }
59
  }
Línea -... Línea 60...
-
 
60
 
-
 
61
  const handleResponse = (msg) => {
-
 
62
    setIsShow(false)
-
 
63
    setResponseMessage(msg)
-
 
64
  }
60
 
65
 
61
  const handleCopy = async () => {
66
  const handleCopy = async () => {
62
    await navigator.clipboard.writeText(`${message.m}`)
67
    await navigator.clipboard.writeText(`${message.m}`)
63
    dispatch(addNotification({
68
    dispatch(addNotification({
64
      style: "success",
69
      style: "success",
Línea 121... Línea 126...
121
                </div>
126
                </div>
122
                <i
127
                <i
123
                  className="la la-ellipsis-v icon"
128
                  className="la la-ellipsis-v icon"
124
                  style={{ position: 'relative' }}
129
                  style={{ position: 'relative' }}
125
                  onClick={() => setIsShow(!isShow)}
130
                  onClick={() => setIsShow(!isShow)}
126
                >
131
                />
127
                </i>
-
 
128
                {
132
                {
129
                  isShow
133
                  isShow
130
                  &&
134
                  &&
131
                  <div
-
 
132
                    className="display-reactions"
135
                  <div className="display-reactions" >
133
                  >
-
 
134
                    <LikeButton
-
 
135
                      onClick={handleLike}
136
                    <LikeButton onClick={handleLike} />
136
                    />
-
 
137
                    <button
-
 
138
                      type="button"
-
 
139
                      onClick={() => setResponseMessage(message)}
137
                    <button type="button" onClick={() => handleResponse(message)}>
140
                    >
-
 
141
                      <i className="fa fa-reply"></i>
138
                      <i className="fa fa-reply" />
142
                    </button>
139
                    </button>
143
                    <button
-
 
144
                      type="button"
-
 
145
                      onClick={() => handleCopy(message)}
140
                    <button type="button" onClick={() => handleCopy(message)}>
146
                    >
-
 
147
                      <i className="fa fa-copy"></i>
141
                      <i className="fa fa-copy" />
148
                    </button>
142
                    </button>
149
                  </div>
143
                  </div>
150
                }
144
                }
151
              </div>
145
              </div>
152
            </div>
146
            </div>
Línea 155... Línea 149...
155
      );
149
      );
156
    case "image":
150
    case "image":
157
      return (
151
      return (
158
        <li
152
        <li
159
          key={message.id}
153
          key={message.id}
160
          className={`clearfix ${message.u === 1 ? "odd" : ""
154
          className={`clearfix ${message.u === 1 ? "odd" : ""} m-t-10 conversers${message.u}`}
161
            } m-t-10 conversers${message.u}`}
-
 
162
        >
155
        >
163
          <div
156
          <div
164
            className="conversation-text"
157
            className="conversation-text"
165
            data-toggle="tooltip"
158
            data-toggle="tooltip"
166
            data-placement="left"
159
            data-placement="left"
Línea 184... Línea 177...
184
                  </a>
177
                  </a>
185
                }
178
                }
186
              </StyledChatImgMessage>
179
              </StyledChatImgMessage>
187
              <br />
180
              <br />
188
              <i className="text-right">{message.time}</i>
181
              <i className="text-right">{message.time}</i>
-
 
182
              {
-
 
183
                isLiked
-
 
184
                &&
-
 
185
                <i
-
 
186
                  className="fas fa-heart"
-
 
187
                  style={{
-
 
188
                    color: '#0961bf',
-
 
189
                    position: 'absolute',
-
 
190
                    top: '87%',
-
 
191
                    left: '85%'
-
 
192
                  }}
-
 
193
                />
-
 
194
              }
189
            </div>
195
            </div>
-
 
196
            <i
-
 
197
              className="la la-ellipsis-v icon"
-
 
198
              style={{ position: 'relative' }}
-
 
199
              onClick={() => setIsShow(!isShow)}
-
 
200
            />
190
            {
201
            {
191
              isShow
202
              isShow
192
              &&
203
              &&
193
              <div className="display-reactions">
204
              <div className="display-reactions">
194
                <LikeButton
-
 
195
                  onClick={handleLike}
205
                <LikeButton onClick={handleLike} />
196
                />
-
 
197
                <button type="button" onClick={() => setResponseMessage(message)}>
206
                <button type="button" onClick={() => handleResponse(message)}>
198
                  <i className="fa fa-reply" />
207
                  <i className="fa fa-reply" />
199
                </button>
208
                </button>
200
              </div>
209
              </div>
201
            }
210
            }
202
          </div>
211
          </div>
Línea 204... Línea 213...
204
      );
213
      );
205
    case "video":
214
    case "video":
206
      return (
215
      return (
207
        <li
216
        <li
208
          key={message.id}
217
          key={message.id}
209
          className={`clearfix ${message.u === 1 ? "odd" : ""
218
          className={`clearfix ${message.u === 1 ? "odd" : ""} m-t-10 conversers${message.u}`}
210
            } m-t-10 conversers${message.u}`}
-
 
211
        >
219
        >
212
          <div
220
          <div
213
            className="conversation-text"
221
            className="conversation-text"
214
            data-toggle="tooltip"
222
            data-toggle="tooltip"
215
            data-placement="left"
223
            data-placement="left"
Línea 238... Línea 246...
238
                  </a>
246
                  </a>
239
                }
247
                }
240
              </StyledChatImgMessage>
248
              </StyledChatImgMessage>
241
              <br />
249
              <br />
242
              <i className="text-right">{message.time}</i>
250
              <i className="text-right">{message.time}</i>
-
 
251
              {
-
 
252
                isLiked
-
 
253
                &&
-
 
254
                <i
-
 
255
                  className="fas fa-heart"
-
 
256
                  style={{
-
 
257
                    color: '#0961bf',
-
 
258
                    position: 'absolute',
-
 
259
                    top: '87%',
-
 
260
                    left: '85%'
-
 
261
                  }}
-
 
262
                />
-
 
263
              }
243
            </div>
264
            </div>
-
 
265
            <i
-
 
266
              className="la la-ellipsis-v icon"
-
 
267
              style={{ position: 'relative' }}
-
 
268
              onClick={() => setIsShow(!isShow)}
-
 
269
            />
-
 
270
            {
-
 
271
              isShow
-
 
272
              &&
-
 
273
              <div className="display-reactions">
-
 
274
                <LikeButton onClick={handleLike} />
-
 
275
                <button type="button" onClick={() => handleResponse(message)}>
-
 
276
                  <i className="fa fa-reply" />
-
 
277
                </button>
-
 
278
              </div>
-
 
279
            }
244
          </div>
280
          </div>
245
        </li>
281
        </li>
246
      );
282
      );
247
    case "document":
283
    case "document":
248
      return (
284
      return (
249
        <li
285
        <li
250
          key={message.id}
286
          key={message.id}
251
          className={`clearfix ${message.u === 1 ? "odd" : ""
287
          className={`clearfix ${message.u === 1 ? "odd" : ""} m-t-10 conversers${message.u}`}
252
            } m-t-10 conversers${message.u}`}
-
 
253
        >
288
        >
254
          <div
289
          <div
255
            className="conversation-text"
290
            className="conversation-text"
256
            data-toggle="tooltip"
291
            data-toggle="tooltip"
257
            data-placement="left"
292
            data-placement="left"
Línea 278... Línea 313...
278
                  </a>
313
                  </a>
279
                }
314
                }
280
              </StyledChatImgMessage>
315
              </StyledChatImgMessage>
281
              <br />
316
              <br />
282
              <i className="text-right">{message.time}</i>
317
              <i className="text-right">{message.time}</i>
-
 
318
              {
-
 
319
                isLiked
-
 
320
                &&
-
 
321
                <i
-
 
322
                  className="fas fa-heart"
-
 
323
                  style={{
-
 
324
                    color: '#0961bf',
-
 
325
                    position: 'absolute',
-
 
326
                    top: '87%',
-
 
327
                    left: '85%'
-
 
328
                  }}
-
 
329
                />
-
 
330
              }
283
            </div>
331
            </div>
-
 
332
            <i
-
 
333
              className="la la-ellipsis-v icon"
-
 
334
              style={{ position: 'relative' }}
-
 
335
              onClick={() => setIsShow(!isShow)}
-
 
336
            />
-
 
337
            {
-
 
338
              isShow
-
 
339
              &&
-
 
340
              <div className="display-reactions">
-
 
341
                <LikeButton onClick={handleLike} />
-
 
342
                <button type="button" onClick={() => handleResponse(message)}>
-
 
343
                  <i className="fa fa-reply" />
-
 
344
                </button>
-
 
345
              </div>
-
 
346
            }
284
          </div>
347
          </div>
285
        </li>
348
        </li>
286
      );
349
      );
287
    default:
350
    default:
288
      return (
351
      return (
289
        <li
352
        <li
290
          key={message.id}
353
          key={message.id}
291
          className={`clearfix ${message.u === 1 ? "odd" : ""
354
          className={`clearfix ${message.u === 1 ? "odd" : ""} m-t-10 conversers${message.u}`}
292
            } m-t-10 conversers${message.u}`}
-
 
293
        >
355
        >
294
          <div
356
          <div
295
            className="conversation-text"
357
            className="conversation-text"
296
            data-toggle="tooltip"
358
            data-toggle="tooltip"
297
            data-placement="left"
359
            data-placement="left"
298
            data-html="true"
360
            data-html="true"
299
          >
361
          >
300
            <div className="ctext-wrap">
362
            <div className="ctext-wrap">
301
              {senderName(message)}
363
              {senderName(message)}
302
              <p className="">
364
              <p>
303
                {message.mtype}
365
                {message.mtype}
304
                <br />
366
                <br />
305
                <i className="text-right">{message.time}</i>
367
                <i className="text-right">{message.time}</i>
306
              </p>
368
              </p>
307
            </div>
369
            </div>
-
 
370
            <i
-
 
371
              className="la la-ellipsis-v icon"
-
 
372
              style={{ position: 'relative' }}
-
 
373
              onClick={() => setIsShow(!isShow)}
-
 
374
            />
-
 
375
            {
-
 
376
              isShow
-
 
377
              &&
-
 
378
              <div className="display-reactions">
-
 
379
                <LikeButton onClick={handleLike} />
-
 
380
                <button type="button" onClick={() => setResponseMessage(message)}>
-
 
381
                  <i className="fa fa-reply" />
-
 
382
                </button>
-
 
383
              </div>
-
 
384
            }
308
          </div>
385
          </div>
309
        </li>
386
        </li>
310
      );
387
      );
311
  }
388
  }
312
};
389
};