mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
Project managers, board members, auto-update after reconnection, refactoring
This commit is contained in:
parent
7956503a46
commit
fe91b5241e
478 changed files with 21226 additions and 19495 deletions
|
@ -1,18 +1,53 @@
|
|||
import ActionTypes from '../constants/ActionTypes';
|
||||
import SocketStatuses from '../constants/SocketStatuses';
|
||||
|
||||
/* Events */
|
||||
export const handleSocketDisconnect = () => ({
|
||||
type: ActionTypes.SOCKET_DISCONNECT_HANDLE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
export const socketDisconnected = () => ({
|
||||
type: ActionTypes.SOCKET_STATUS_CHANGED,
|
||||
export const handleSocketReconnect = (
|
||||
user,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
tasks,
|
||||
attachments,
|
||||
actions,
|
||||
notifications,
|
||||
) => ({
|
||||
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
|
||||
payload: {
|
||||
status: SocketStatuses.DISCONNECTED,
|
||||
user,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
tasks,
|
||||
attachments,
|
||||
actions,
|
||||
notifications,
|
||||
},
|
||||
});
|
||||
|
||||
export const socketReconnected = () => ({
|
||||
type: ActionTypes.SOCKET_STATUS_CHANGED,
|
||||
handleSocketReconnect.fetchCore = (currentUserId, currentBoardId) => ({
|
||||
type: ActionTypes.SOCKET_RECONNECT_HANDLE__CORE_FETCH,
|
||||
payload: {
|
||||
status: SocketStatuses.RECONNECTED,
|
||||
currentUserId,
|
||||
currentBoardId,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue