Put theme into config

master
Håvar Aambø Fosstveit 2019-04-01 10:21:14 +02:00
parent 63b13e4e33
commit 4d21e7b4e9
4 changed files with 42 additions and 19 deletions

View File

@ -16,5 +16,40 @@ var config =
{ {
tcp : true tcp : true
}, },
lastN : 4 lastN : 4,
theme :
{
palette :
{
primary :
{
main : '#313131'
}
},
overrides :
{
MuiAppBar :
{
colorPrimary :
{
backgroundColor : '#313131'
}
},
MuiFab :
{
primary :
{
backgroundColor : '#5F9B2D',
'&:hover' :
{
backgroundColor : '#518029'
}
}
}
},
typography :
{
useNextVariants : true
}
}
}; };

View File

@ -44,7 +44,7 @@ const styles = (theme) =>
{ {
opacity : 0, opacity : 0,
transition : 'opacity .5s' transition : 'opacity .5s'
}, }
}); });
class Sidebar extends React.PureComponent class Sidebar extends React.PureComponent
@ -89,7 +89,7 @@ class Sidebar extends React.PureComponent
aria-label='Share screen' aria-label='Share screen'
className={classes.fab} className={classes.fab}
disabled={!me.canShareScreen || me.screenShareInProgress} disabled={!me.canShareScreen || me.screenShareInProgress}
color={screenState === 'on' ? 'secondary' : 'default'} color={screenState === 'on' ? 'primary' : 'default'}
onClick={() => onClick={() =>
{ {
@ -134,7 +134,7 @@ class Sidebar extends React.PureComponent
<Fab <Fab
aria-label='Room lock' aria-label='Room lock'
className={classes.fab} className={classes.fab}
color={locked ? 'secondary' : 'default'} color={locked ? 'primary' : 'default'}
onClick={() => onClick={() =>
{ {
if (locked) if (locked)
@ -158,7 +158,7 @@ class Sidebar extends React.PureComponent
aria-label='Raise hand' aria-label='Raise hand'
className={classes.fab} className={classes.fab}
disabled={me.raiseHandInProgress} disabled={me.raiseHandInProgress}
color={me.raiseHand ? 'secondary' : 'default'} color={me.raiseHand ? 'primary' : 'default'}
onClick={() => roomClient.sendRaiseHandState(!me.raiseHand)} onClick={() => roomClient.sendRaiseHandState(!me.raiseHand)}
> >
<Avatar alt='Hand' src={me.raiseHand ? HandOn : HandOff} /> <Avatar alt='Hand' src={me.raiseHand ? HandOn : HandOff} />

View File

@ -18,7 +18,7 @@ const styles = (theme) =>
} }
}); });
class MessageList extends React.PureComponent class MessageList extends React.Component
{ {
componentDidMount() componentDidMount()
{ {

View File

@ -32,19 +32,7 @@ let roomClient;
RoomClient.init({ store }); RoomClient.init({ store });
const theme = createMuiTheme({ const theme = createMuiTheme(window.config.theme);
palette :
{
primary :
{
main : '#313131'
}
},
typography :
{
useNextVariants : true
}
});
domready(() => domready(() =>
{ {