mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: show network stats for collaboration
This commit is contained in:
parent
1e17c1967b
commit
8157c84d11
6 changed files with 83 additions and 1 deletions
|
@ -30,6 +30,7 @@ export const Stats = (props: {
|
|||
setAppState: React.Component<any, AppState>["setState"];
|
||||
elements: readonly NonDeletedExcalidrawElement[];
|
||||
onClose: () => void;
|
||||
isCollaborating: boolean;
|
||||
}) => {
|
||||
const isMobile = useIsMobile();
|
||||
const [storageSizes, setStorageSizes] = useState<StorageSizes>({
|
||||
|
@ -192,6 +193,21 @@ export const Stats = (props: {
|
|||
{hash}
|
||||
</td>
|
||||
</tr>
|
||||
{props.isCollaborating ? (
|
||||
<>
|
||||
<tr>
|
||||
<th colSpan={2}>{t("stats.collaboration")}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("stats.collaborators")}</td>
|
||||
<td>{props.appState.collaborators.size}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("stats.networkSpeed")}</td>
|
||||
<td>{props.appState.networkSpeed}</td>
|
||||
</tr>
|
||||
</>
|
||||
) : null}
|
||||
</tbody>
|
||||
</table>
|
||||
</Island>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue