Login status not reflected in login button, fixes #173
parent
8ea875e8d1
commit
938d344bd0
|
|
@ -503,6 +503,8 @@ export default class RoomClient
|
|||
{
|
||||
logger.debug('receiveLogoutChildWindow()');
|
||||
|
||||
store.dispatch(meActions.setPicture(null));
|
||||
|
||||
store.dispatch(meActions.loggedIn(false));
|
||||
|
||||
store.dispatch(requestActions.notify(
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ const DialogTitle = withStyles(styles)((props) =>
|
|||
};
|
||||
}, []);
|
||||
|
||||
const { children, classes, myPicture, onLogin, ...other } = props;
|
||||
const { children, classes, myPicture, onLogin, loggedIn, ...other } = props;
|
||||
|
||||
const handleTooltipClose = () =>
|
||||
{
|
||||
|
|
@ -115,6 +115,17 @@ const DialogTitle = withStyles(styles)((props) =>
|
|||
setOpen(true);
|
||||
};
|
||||
|
||||
const loginTooltip = loggedIn ?
|
||||
intl.formatMessage({
|
||||
id : 'tooltip.logout',
|
||||
defaultMessage : 'Log out'
|
||||
})
|
||||
:
|
||||
intl.formatMessage({
|
||||
id : 'tooltip.login',
|
||||
defaultMessage : 'Log in'
|
||||
});
|
||||
|
||||
return (
|
||||
<MuiDialogTitle disableTypography className={classes.dialogTitle} {...other}>
|
||||
{ window.config && window.config.logo && <img alt='Logo' className={classes.logo} src={window.config.logo} /> }
|
||||
|
|
@ -124,10 +135,7 @@ const DialogTitle = withStyles(styles)((props) =>
|
|||
onClose={handleTooltipClose}
|
||||
onOpen={handleTooltipOpen}
|
||||
open={open}
|
||||
title={intl.formatMessage({
|
||||
id : 'tooltip.login',
|
||||
defaultMessage : 'Click to log in'
|
||||
})}
|
||||
title={loginTooltip}
|
||||
placement='left'
|
||||
>
|
||||
<IconButton
|
||||
|
|
@ -211,6 +219,7 @@ const JoinDialog = ({
|
|||
{
|
||||
loggedIn ? roomClient.logout() : roomClient.login();
|
||||
}}
|
||||
loggedIn={loggedIn}
|
||||
>
|
||||
{ window.config && window.config.title ? window.config.title : 'Multiparty meeting' }
|
||||
<hr />
|
||||
|
|
|
|||
Loading…
Reference in New Issue