Fix Settings not updating ApiUri
This commit is contained in:
parent
a383ded819
commit
f4011a7cbc
@ -49,7 +49,10 @@ export default function App(){
|
||||
: <></>}
|
||||
<MonitorJobsList updateList={updateMonitorList} apiUri={apiUri} onStartSearch={() => setShowSearch(true)} onJobsChanged={UpdateList} connectedToBackend={connected} />
|
||||
</>
|
||||
: <h1>No connection to backend</h1>}
|
||||
: <>
|
||||
<h1>No connection to the Backend.</h1>
|
||||
<h3>Check the Settings ApiUri.</h3>
|
||||
</>}
|
||||
<Footer apiUri={apiUri} connectedToBackend={connected} />
|
||||
</div>)
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, {KeyboardEventHandler, useEffect, useState} from 'react';
|
||||
import IFrontendSettings from "./interfaces/IFrontendSettings";
|
||||
import IFrontendSettings, {FrontendSettingsWith} from "./interfaces/IFrontendSettings";
|
||||
import '../styles/settings.css';
|
||||
import IBackendSettings from "./interfaces/IBackendSettings";
|
||||
import {getData} from "../App";
|
||||
@ -78,8 +78,9 @@ export default function Settings({backendConnected, apiUri, settings, changeSett
|
||||
}
|
||||
|
||||
const SubmitApiUri : KeyboardEventHandler<HTMLInputElement> = (e) => {
|
||||
const newSettings = FrontendSettingsWith(frontendSettings, undefined, e.currentTarget.value);
|
||||
if(e.key == "Enter")
|
||||
changeSettings(settings);
|
||||
changeSettings(newSettings);
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user