diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-11-15 10:18:47 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-11-15 10:18:47 -0600 |
| commit | 46c76a768f515214dfaf3b58b79bc0ca48aa8a71 (patch) | |
| tree | bc85579538e50d20168d424d1cf0a19021344085 /src/web | |
| parent | 74a1d79dd559891aae4d8a5a9d472dc9bfc49269 (diff) | |
| download | slskd-46c76a768f515214dfaf3b58b79bc0ca48aa8a71.tar.gz | |
update network references
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/App.js | 8 | ||||
| -rw-r--r-- | src/web/src/lib/relay.js (renamed from src/web/src/lib/network.js) | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js index 0439943b..8e31741c 100644 --- a/src/web/src/components/App.js +++ b/src/web/src/components/App.js @@ -5,7 +5,7 @@ import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import * as session from '../lib/session'; -import * as networkAPI from '../lib/network'; +import * as relay from '../lib/relay'; import { connect, disconnect } from '../lib/server'; import { urlBase } from '../config'; @@ -119,7 +119,7 @@ class App extends Component { const { login, applicationState = {}, applicationOptions = {}, error, initialized, retriesExhausted } = this.state; const { version = {}, - network = {}, + relay = {}, server, pendingReconnect, pendingRestart, @@ -129,7 +129,7 @@ class App extends Component { const { isUpdateAvailable, current, latest } = version; const { scanPending: pendingShareRescan } = shares; - const { mode, controller } = network; + const { mode, controller } = relay; if (!initialized) { return <Loader active size='big'/>; @@ -212,7 +212,7 @@ class App extends Component { return <> <Menu.Item - onClick={() => isConnected ? networkAPI.connect() : networkAPI.disconnect()} + onClick={() => isConnected ? relay.connect() : relay.disconnect()} > <Icon.Group className='menu-icon-group'> <Icon name='plug' color={isConnected ? 'green' : isTransitioning ? 'yellow' : 'grey'}/> diff --git a/src/web/src/lib/network.js b/src/web/src/lib/relay.js index 07ed89e3..b20d0af2 100644 --- a/src/web/src/lib/network.js +++ b/src/web/src/lib/relay.js @@ -1,9 +1,9 @@ import api from './api'; export const connect = () => { - return api.put('/network'); + return api.put('/relay'); }; export const disconnect = () => { - return api.delete('/network'); + return api.delete('/relay'); };
\ No newline at end of file |
