Show avatar when logged in and support logging out

This commit is contained in:
Torjus
2018-07-24 11:14:52 +02:00
parent c414fd5301
commit aca2ec90f0
7 changed files with 57 additions and 14 deletions
+8 -1
View File
@@ -23,7 +23,8 @@ const initialState =
restartIceInProgress : false,
picture : null,
selectedWebcam : null,
selectedAudioDevice : null
selectedAudioDevice : null,
loggedIn : false
};
const me = (state = initialState, action) =>
@@ -50,6 +51,12 @@ const me = (state = initialState, action) =>
};
}
case 'LOGGED_IN':
return { ...state, loggedIn: true };
case 'USER_LOGOUT':
return { ...state, loggedIn: false };
case 'CHANGE_WEBCAM':
{
return { ...state, selectedWebcam: action.payload.deviceId };