Skip to content

Commit

Permalink
feat: disable settings in browser by adding localhost:1176/?settings=0
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jan 23, 2020
1 parent c01ae61 commit f2dc03f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The levels are:
### Open GUI in browser:
```
localhost:1176 (or whatever ip you use for Sisyfos Nodejs/Docker)
IF you wan´t to disable settings:
localhost:1176/?settings=0
```

## Settings:
Expand Down
1 change: 1 addition & 0 deletions client/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class App extends React.Component<IAppProps> {
}

componentWillMount() {
console.log('http args : ', window.location.search.includes('settings=0'))
window.socketIoClient.emit('get-mixerprotocol', 'get selected mixerprotocol')
window.socketIoClient.emit('get-store', 'update local store');
window.socketIoClient.emit('get-settings', 'update local settings');
Expand Down
26 changes: 16 additions & 10 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,22 @@ class ChanStrip extends React.PureComponent<IChanStripProps & IChanStripInjectPr

</div>
<div className="header">
<button
className="button"
onClick={() => this.handleShowRoutingOptions()}
>CHANNEL ROUTING
</button>
<button
className="button"
onClick={() => this.handleShowMonitorOptions()}
>MONITOR ROUTING
</button>
{window.location.search.includes('settings=0') ?
null :
<button
className="button"
onClick={() => this.handleShowRoutingOptions()}
>CHANNEL ROUTING
</button>
}
{window.location.search.includes('settings=0') ?
null :
<button
className="button"
onClick={() => this.handleShowMonitorOptions()}
>MONITOR ROUTING
</button>
}
</div>
<hr/>
{this.props.offtubeMode ?
Expand Down
8 changes: 6 additions & 2 deletions client/components/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,24 @@ class Channels extends React.Component<IChannelsInjectProps & Store> {
</button>
}

{window.location.search.includes('settings=0') ?
null :
<button
className="channels-show-settings-button"
onClick={() => {
this.handleShowSettings();
}}
>SETTINGS</button>

}
{window.location.search.includes('settings=0') ?
null :
<button
className="channels-show-storage-button"
onClick={() => {
this.handleShowStorage();
}}
>STORAGE</button>

}
<button
className="channels-clear-button"
onClick={() => {
Expand Down

0 comments on commit f2dc03f

Please sign in to comment.