Add fastresume to desktop app

This commit is contained in:
Igor Katson 2024-08-21 22:58:02 +01:00
parent e8ef1f170d
commit eb2b9e5a41
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
5 changed files with 22 additions and 1 deletions

View file

@ -17,6 +17,7 @@ interface RqbitDesktopConfigTcpListen {
interface RqbitDesktopConfigPersistence {
disable: boolean;
folder: PathLike;
fastresume: boolean;
}
interface RqbitDesktopConfigPeerOpts {

View file

@ -299,6 +299,14 @@ export const ConfigModal: React.FC<{
onChange={handleInputChange}
disabled={config.persistence.disable}
/>
<FormCheck
label="Enable fast resume (experimental)"
name="persistence.fastresume"
checked={config.persistence.fastresume}
onChange={handleToggleChange}
help="If enabled, restarting will not rehash torrents, and thus will be faster. You should not modify the downloaded files in any way if you use that."
/>
</Fieldset>
</Tab>

View file

@ -19,6 +19,7 @@ async function get_current_config(): Promise<CurrentDesktopState> {
Promise.all([get_version(), get_default_config(), get_current_config()]).then(
([version, defaultConfig, currentState]) => {
console.log(version, defaultConfig, currentState);
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<StrictMode>
<RqbitDesktop