🔧 Formatting and more layout changes
This commit is contained in:
@@ -13,17 +13,17 @@ import {
|
|||||||
|
|
||||||
export const saveSettings =
|
export const saveSettings =
|
||||||
(settingsPayload, settingsKey: string, settingsObjectId?: string) =>
|
(settingsPayload, settingsKey: string, settingsObjectId?: string) =>
|
||||||
async (dispatch) => {
|
async (dispatch) => {
|
||||||
const result = await axios({
|
const result = await axios({
|
||||||
url: `${SETTINGS_SERVICE_BASE_URI}/saveSettings`,
|
url: `${SETTINGS_SERVICE_BASE_URI}/saveSettings`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: { settingsPayload, settingsKey, settingsObjectId },
|
data: { settingsPayload, settingsKey, settingsObjectId },
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SETTINGS_OBJECT_FETCHED,
|
type: SETTINGS_OBJECT_FETCHED,
|
||||||
data: result.data,
|
data: result.data,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getSettings = (settingsKey?) => async (dispatch) => {
|
export const getSettings = (settingsKey?) => async (dispatch) => {
|
||||||
const result = await axios({
|
const result = await axios({
|
||||||
@@ -85,6 +85,6 @@ export const getQBitTorrentClientInfo = (hostInfo) => async (dispatch) => {
|
|||||||
console.log(bar);
|
console.log(bar);
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SETTINGS_QBITTORRENT_TORRENTS_LIST_FETCHED,
|
type: SETTINGS_QBITTORRENT_TORRENTS_LIST_FETCHED,
|
||||||
data: foo,
|
data: bar.data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const AirDCPPSettingsForm = (): ReactElement => {
|
|||||||
airDCPPSettings.setSettings({});
|
airDCPPSettings.setSettings({});
|
||||||
dispatch(deleteSettings());
|
dispatch(deleteSettings());
|
||||||
}, []);
|
}, []);
|
||||||
const validate = async () => {};
|
const validate = async () => { };
|
||||||
const initFormData = !isUndefined(
|
const initFormData = !isUndefined(
|
||||||
airDCPPSettings.airDCPPState.settings.directConnect,
|
airDCPPSettings.airDCPPState.settings.directConnect,
|
||||||
)
|
)
|
||||||
@@ -41,7 +41,7 @@ export const AirDCPPSettingsForm = (): ReactElement => {
|
|||||||
initialValues={initFormData}
|
initialValues={initFormData}
|
||||||
render={({ handleSubmit }) => (
|
render={({ handleSubmit }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<h2>AirDC++ Connection Information</h2>
|
<h2>Configure AirDC++</h2>
|
||||||
<label className="label">AirDC++ Hostname</label>
|
<label className="label">AirDC++ Hostname</label>
|
||||||
<div className="field has-addons">
|
<div className="field has-addons">
|
||||||
<p className="control">
|
<p className="control">
|
||||||
|
|||||||
@@ -34,14 +34,13 @@ export const QbittorrentConnectionForm = (): ReactElement => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<pre> {JSON.stringify(torrents, null, 4)} </pre>
|
|
||||||
|
|
||||||
<Form
|
<Form
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
// validate={}
|
// validate={}
|
||||||
initialValues={qBittorrentSettings}
|
initialValues={qBittorrentSettings}
|
||||||
render={({ handleSubmit }) => (
|
render={({ handleSubmit }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form className="content" onSubmit={handleSubmit}>
|
||||||
<h2>Configure Qbittorrent</h2>
|
<h2>Configure Qbittorrent</h2>
|
||||||
<label className="label">Qbittorrent Hostname</label>
|
<label className="label">Qbittorrent Hostname</label>
|
||||||
<div className="field has-addons">
|
<div className="field has-addons">
|
||||||
@@ -126,6 +125,7 @@ export const QbittorrentConnectionForm = (): ReactElement => {
|
|||||||
</form>
|
</form>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<pre> {JSON.stringify(torrents, null, 4)} </pre>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user