Initial work on tool area. Moved chat, settings and participant list into tool area.

This commit is contained in:
Håvar Aambø Fosstveit
2018-06-20 14:23:47 +02:00
parent 71a1369bb3
commit 5168feefe0
23 changed files with 1390 additions and 452 deletions
+3 -1
View File
@@ -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;
+13
View File
@@ -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;
+30
View File
@@ -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;