mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-21 16:29:58 +02:00
feat: show network stats for collaboration
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user