Disable output button when no outputs available

This commit is contained in:
James Barnsley
2018-07-06 12:58:19 +12:00
parent 0848229a9b
commit e64c753f07
6 changed files with 22853 additions and 20901 deletions

View File

@ -109,11 +109,21 @@ class OutputControl extends React.Component{
</span>
);
} else {
return (
<span className="output-control">
<a className="control speakers" onClick={e => this.setExpanded()}><Icon name="speaker" /></a>
</span>
);
// No customisable outputs
if (!this.props.http_streaming_enabled && !this.props.snacast_enabled){
return (
<span className="output-control disabled">
<a className="control speakers"><Icon name="speaker" /></a>
</span>
);
} else {
return (
<span className="output-control">
<a className="control speakers" onClick={e => this.setExpanded()}><Icon name="speaker" /></a>
</span>
);
}
}
}
}

View File

@ -2,6 +2,13 @@
.output-control {
position: relative;
&.disabled {
& > .control {
opacity: 0.2;
cursor: not-allowed;
}
}
.outputs {
position: absolute;
bottom: 40px;