aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-12 09:08:03 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-12 09:08:03 -0500
commit26c134e898c65110e63dcc4254cf7693f5f096a2 (patch)
tree3762da1c9dcb0f4663919610eb3869352a68b2ed /src
parent193a050ad1ed6be9f2a0af31cf20994b4d0091bd (diff)
downloadslskd-26c134e898c65110e63dcc4254cf7693f5f096a2.tar.gz
capture options from SignalR and pass to System
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/App.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js
index f8813820..0eb2b6a9 100644
--- a/src/web/src/components/App.js
+++ b/src/web/src/components/App.js
@@ -34,6 +34,7 @@ const initialState = {
error: undefined
},
applicationState: {},
+ applicationOptions: {},
error: false,
};
@@ -64,6 +65,11 @@ class App extends Component {
this.setState({ applicationState: state });
});
+ appHub.on('options', (options) => {
+ console.debug(options);
+ this.setState({ applicationOptions: options });
+ })
+
appHub.onreconnecting(() => this.setState({ error: true }));
appHub.onclose(() => this.setState({ error: true }));
appHub.onreconnected(() => this.setState({ error: false }));
@@ -226,7 +232,7 @@ class App extends Component {
<Route path='*/rooms' render={(props) => this.withTokenCheck(<Rooms {...props}/>)}/>
<Route path='*/uploads' render={(props) => this.withTokenCheck(<Transfers {...props} direction='upload'/>)}/>
<Route path='*/downloads' render={(props) => this.withTokenCheck(<Transfers {...props} direction='download'/>)}/>
- <Route path='*/system' render={(props) => this.withTokenCheck(<System state={this.state.applicationState}/>)}/>
+ <Route path='*/system' render={(props) => this.withTokenCheck(<System state={this.state.applicationState} options={this.state.applicationOptions} />)}/>
<Route path='*/' render={(props) => this.withTokenCheck(<Search {...props}/>)}/>
</Switch>
</Sidebar.Pusher>