Disable output button when no outputs available
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,13 @@
|
||||
.output-control {
|
||||
position: relative;
|
||||
|
||||
&.disabled {
|
||||
& > .control {
|
||||
opacity: 0.2;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.outputs {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
|
||||
Reference in New Issue
Block a user