Add disable upload checkbox to UI
This commit is contained in:
parent
7fda8c0a14
commit
8379672f01
4 changed files with 17 additions and 0 deletions
1
desktop/src-tauri/Cargo.lock
generated
1
desktop/src-tauri/Cargo.lock
generated
|
|
@ -2044,6 +2044,7 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"axum",
|
"axum",
|
||||||
"bstr",
|
"bstr",
|
||||||
|
"futures",
|
||||||
"gethostname",
|
"gethostname",
|
||||||
"http 1.1.0",
|
"http 1.1.0",
|
||||||
"httparse",
|
"httparse",
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,10 @@ pub struct RqbitDesktopConfigUpnp {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub struct RqbitDesktopConfig {
|
pub struct RqbitDesktopConfig {
|
||||||
pub default_download_location: PathBuf,
|
pub default_download_location: PathBuf,
|
||||||
|
|
||||||
|
#[serde(default)]
|
||||||
|
pub disable_upload: bool,
|
||||||
|
|
||||||
pub dht: RqbitDesktopConfigDht,
|
pub dht: RqbitDesktopConfigDht,
|
||||||
pub tcp_listen: RqbitDesktopConfigTcpListen,
|
pub tcp_listen: RqbitDesktopConfigTcpListen,
|
||||||
pub upnp: RqbitDesktopConfigUpnp,
|
pub upnp: RqbitDesktopConfigUpnp,
|
||||||
|
|
@ -167,6 +171,7 @@ impl Default for RqbitDesktopConfig {
|
||||||
persistence: Default::default(),
|
persistence: Default::default(),
|
||||||
peer_opts: Default::default(),
|
peer_opts: Default::default(),
|
||||||
http_api: Default::default(),
|
http_api: Default::default(),
|
||||||
|
disable_upload: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ interface RqbitDesktopConfigUpnp {
|
||||||
|
|
||||||
export interface RqbitDesktopConfig {
|
export interface RqbitDesktopConfig {
|
||||||
default_download_location: PathLike;
|
default_download_location: PathLike;
|
||||||
|
disable_upload: boolean;
|
||||||
dht: RqbitDesktopConfigDht;
|
dht: RqbitDesktopConfigDht;
|
||||||
tcp_listen: RqbitDesktopConfigTcpListen;
|
tcp_listen: RqbitDesktopConfigTcpListen;
|
||||||
upnp: RqbitDesktopConfigUpnp;
|
upnp: RqbitDesktopConfigUpnp;
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,16 @@ export const ConfigModal: React.FC<{
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
help="Where to download torrents by default. You can override this per torrent."
|
help="Where to download torrents by default. You can override this per torrent."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<FormCheck
|
||||||
|
label="Disable upload"
|
||||||
|
name="disable_upload"
|
||||||
|
checked={config.disable_upload}
|
||||||
|
onChange={handleToggleChange}
|
||||||
|
help="Disable uploading entirely. If this is set, rqbit won't share piece availability and will disconnect on download request.
|
||||||
|
|
||||||
|
Might be useful e.g. if rqbit upload consumes all your upload bandwidth and interferes with your other Internet usage."
|
||||||
|
/>
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
<Tab name="DHT" currentTab={tab}>
|
<Tab name="DHT" currentTab={tab}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue