Merge branch 'feature-toolarea' into develop
This commit is contained in:
@@ -7,6 +7,7 @@ import consumers from './consumers';
|
||||
import notifications from './notifications';
|
||||
import chatmessages from './chatmessages';
|
||||
import chatbehavior from './chatbehavior';
|
||||
import toolarea from './toolarea';
|
||||
|
||||
const reducers = combineReducers(
|
||||
{
|
||||
@@ -17,7 +18,8 @@ const reducers = combineReducers(
|
||||
consumers,
|
||||
notifications,
|
||||
chatmessages,
|
||||
chatbehavior
|
||||
chatbehavior,
|
||||
toolarea
|
||||
});
|
||||
|
||||
export default reducers;
|
||||
|
||||
@@ -60,6 +60,19 @@ const peers = (state = initialState, action) =>
|
||||
return { ...state, [newPeer.name]: newPeer };
|
||||
}
|
||||
|
||||
case 'SET_PEER_SCREEN_IN_PROGRESS':
|
||||
{
|
||||
const { peerName, flag } = action.payload;
|
||||
const peer = state[peerName];
|
||||
|
||||
if (!peer)
|
||||
throw new Error('no Peer found');
|
||||
|
||||
const newPeer = { ...peer, peerScreenInProgress: flag };
|
||||
|
||||
return { ...state, [newPeer.name]: newPeer };
|
||||
}
|
||||
|
||||
case 'SET_PEER_RAISE_HAND_STATE':
|
||||
{
|
||||
const { peerName, raiseHandState } = action.payload;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
const initialState =
|
||||
{
|
||||
toolAreaOpen : false,
|
||||
currentToolTab : 'chat' // chat, settings, layout, users
|
||||
};
|
||||
|
||||
const toolarea = (state = initialState, action) =>
|
||||
{
|
||||
switch (action.type)
|
||||
{
|
||||
case 'TOGGLE_TOOL_AREA':
|
||||
{
|
||||
const toolAreaOpen = !state.toolAreaOpen;
|
||||
|
||||
return { ...state, toolAreaOpen };
|
||||
}
|
||||
|
||||
case 'SET_TOOL_TAB':
|
||||
{
|
||||
const { toolTab } = action.payload;
|
||||
|
||||
return { ...state, currentToolTab: toolTab };
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default toolarea;
|
||||
Reference in New Issue
Block a user