feat: Add idle detection to collaboration feature (#2877)
* Start idle detection implementation * First working version * Add screen state * Add type safety * Better rendering, enum types, localization * Add origin trial token * Fix * Refactor idle detection to no longer use IdleDetector API * Cleanup some leftovers * Fix * Apply suggestions from code review * Three state: active 🟢, idle 💤, away ⚫️ * Address feedback from code review Thanks, @lipis * Deal with unmount Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
This commit is contained in:
@ -20,6 +20,7 @@ import { ExcalidrawImperativeAPI } from "./components/App";
|
||||
import type { ResolvablePromise } from "./utils";
|
||||
import { Spreadsheet } from "./charts";
|
||||
import { Language } from "./i18n";
|
||||
import { UserIdleState } from "./excalidraw-app/collab/types";
|
||||
|
||||
export type Point = Readonly<RoughPoint>;
|
||||
|
||||
@ -31,6 +32,7 @@ export type Collaborator = {
|
||||
button?: "up" | "down";
|
||||
selectedElementIds?: AppState["selectedElementIds"];
|
||||
username?: string | null;
|
||||
userState?: UserIdleState;
|
||||
};
|
||||
|
||||
export type AppState = {
|
||||
|
Reference in New Issue
Block a user