PromucFlow_constructor/app/client/src/actions/appCollabActions.ts
Pranav Kanade 2ae0c8c836
Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors

* emitting an event only when socket is connected

* added a tooltip to show username/email

* using proper selector

* using theme

* created the separate component for listing editors

* created a separate hook for app collab events

* moved collab user type to /entities

* moved user visible strings to message constants

* Revert "moved user visible strings to message constants"

This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.

* made provision to reset the concurrent editors list
2021-08-09 14:34:24 +05:30

25 lines
745 B
TypeScript

import { websocketWriteEvent } from "./websocketActions";
import { APP_COLLAB_EVENTS } from "constants/AppCollabConstants";
import { ReduxActionTypes } from "../constants/ReduxActionConstants";
export const collabStartEditingAppEvent = (appId: string) =>
websocketWriteEvent({
type: APP_COLLAB_EVENTS.START_EDITING_APP,
payload: appId,
});
export const collabStopEditingAppEvent = (appId: string) =>
websocketWriteEvent({
type: APP_COLLAB_EVENTS.STOP_EDITING_APP,
payload: appId,
});
export const collabListAppEditorsEvent = (payload: any) => ({
type: ReduxActionTypes.APP_COLLAB_LIST_EDITORS,
payload,
});
export const collabResetAppEditorsEvent = () => ({
type: ReduxActionTypes.APP_COLLAB_RESET_EDITORS,
});