2020-05-17 11:09:16 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
2020-08-27 17:21:34 +02:00
|
|
|
import { Recording } from '../Common/Api';
|
2020-05-17 11:09:16 +02:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
recording: Recording;
|
|
|
|
deleteRecording: (recording: Recording) => void;
|
|
|
|
storeRecording: (recording: Recording) => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
const RecordingRow: React.FC<Props> = ({recording, deleteRecording, storeRecording}) => {
|
|
|
|
return (
|
|
|
|
<tr key={recording.id}>
|
2020-05-22 13:20:47 +02:00
|
|
|
<td className="start icon-col">
|
|
|
|
<a href={recording.url} className="icon icon-external icon-visible" target="_blank" rel="noopener noreferrer"></a>
|
|
|
|
</td>
|
2020-05-17 11:09:16 +02:00
|
|
|
<td className="share icon-col">
|
|
|
|
<CopyToClipboard text={recording.url}>
|
|
|
|
<span className="icon icon-clippy icon-visible copy-to-clipboard" ></span>
|
|
|
|
</CopyToClipboard>
|
|
|
|
</td>
|
|
|
|
<td className="icon-col">
|
2020-05-22 13:16:19 +02:00
|
|
|
<a onClick={() => storeRecording(recording)} className="icon icon-add-shortcut icon-visible"></a>
|
2020-05-17 11:09:16 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{(new Date(recording.startTime)).toLocaleString()}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{recording.length === 0 ? '< 1 min' : (recording.length + ' min')}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{n('bbb', '%n participant', '%n participants', recording.participants)}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{recording.type}
|
|
|
|
</td>
|
|
|
|
<td className="remove icon-col">
|
|
|
|
<a className="icon icon-delete icon-visible"
|
|
|
|
onClick={() => deleteRecording(recording)}
|
|
|
|
title={t('bbb', 'Delete')} />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-08-27 17:21:34 +02:00
|
|
|
export default RecordingRow;
|