Update desktop app to support new persistence config
This commit is contained in:
parent
d77d96bd48
commit
275b3b0185
6 changed files with 68 additions and 22 deletions
|
|
@ -16,7 +16,7 @@ interface RqbitDesktopConfigTcpListen {
|
|||
|
||||
interface RqbitDesktopConfigPersistence {
|
||||
disable: boolean;
|
||||
filename: PathLike;
|
||||
folder: PathLike;
|
||||
}
|
||||
|
||||
interface RqbitDesktopConfigPeerOpts {
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ export const ConfigModal: React.FC<{
|
|||
};
|
||||
|
||||
const handleToggleChange: React.ChangeEventHandler<HTMLInputElement> = (
|
||||
e,
|
||||
e
|
||||
) => {
|
||||
const name: string = e.target.name;
|
||||
const [mainField, subField] = name.split(".", 2);
|
||||
|
|
@ -166,7 +166,7 @@ export const ConfigModal: React.FC<{
|
|||
text: "Error saving configuration",
|
||||
details: e,
|
||||
});
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -292,10 +292,10 @@ export const ConfigModal: React.FC<{
|
|||
/>
|
||||
|
||||
<FormInput
|
||||
label="Persistence filename"
|
||||
name="persistence.filename"
|
||||
label="Persistence folder"
|
||||
name="persistence.folder"
|
||||
inputType="text"
|
||||
value={config.persistence.filename}
|
||||
value={config.persistence.folder}
|
||||
onChange={handleInputChange}
|
||||
disabled={config.persistence.disable}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue