Desktop: fix bugs when changing numbers in configuration
This commit is contained in:
parent
7b5c9cad60
commit
808bef11db
8 changed files with 21 additions and 19 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
with:
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
desktop/src-tauri/target/release/bundle/msi/rqbit-desktop_5.0.1_x64_en-US.msi
|
||||
desktop/src-tauri/target/release/bundle/msi/rqbit-desktop_5.0.2_x64_en-US.msi
|
||||
|
||||
- name: Build release
|
||||
run: cargo build --profile release-github
|
||||
|
|
|
|||
2
crates/librqbit/webui/dist/assets/index.js
vendored
2
crates/librqbit/webui/dist/assets/index.js
vendored
File diff suppressed because one or more lines are too long
2
crates/librqbit/webui/dist/manifest.json
vendored
2
crates/librqbit/webui/dist/manifest.json
vendored
|
|
@ -4,7 +4,7 @@
|
|||
"src": "assets/logo.svg"
|
||||
},
|
||||
"index.html": {
|
||||
"file": "assets/index-8d982016.js",
|
||||
"file": "assets/index-b673c0d1.js",
|
||||
"isEntry": true,
|
||||
"src": "index.html"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,12 +67,12 @@ async fn forward_port(
|
|||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||
<s:Body>
|
||||
<u:AddPortMapping xmlns:u="{}">
|
||||
<u:AddPortMapping xmlns:u="{SERVICE_TYPE_WAN_IP_CONNECTION}">
|
||||
<NewRemoteHost></NewRemoteHost>
|
||||
<NewExternalPort>{}</NewExternalPort>
|
||||
<NewExternalPort>{port}</NewExternalPort>
|
||||
<NewProtocol>TCP</NewProtocol>
|
||||
<NewInternalPort>{}</NewInternalPort>
|
||||
<NewInternalClient>{}</NewInternalClient>
|
||||
<NewInternalPort>{port}</NewInternalPort>
|
||||
<NewInternalClient>{local_ip}</NewInternalClient>
|
||||
<NewEnabled>1</NewEnabled>
|
||||
<NewPortMappingDescription>rust UPnP</NewPortMappingDescription>
|
||||
<NewLeaseDuration>{}</NewLeaseDuration>
|
||||
|
|
@ -80,10 +80,6 @@ async fn forward_port(
|
|||
</s:Body>
|
||||
</s:Envelope>
|
||||
"#,
|
||||
SERVICE_TYPE_WAN_IP_CONNECTION,
|
||||
port,
|
||||
port,
|
||||
local_ip,
|
||||
lease_duration.as_secs()
|
||||
);
|
||||
|
||||
|
|
|
|||
2
desktop/src-tauri/Cargo.lock
generated
2
desktop/src-tauri/Cargo.lock
generated
|
|
@ -3011,7 +3011,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rqbit-desktop"
|
||||
version = "5.0.1"
|
||||
version = "5.0.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rqbit-desktop"
|
||||
version = "5.0.1"
|
||||
version = "5.0.2"
|
||||
description = "rqbit torrent client"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function errorToUIError(
|
|||
let reason: ErrorDetails = {
|
||||
method: "INVOKE",
|
||||
path: path,
|
||||
text: e.human_readable,
|
||||
text: e.human_readable ?? e.toString(),
|
||||
status: e.status,
|
||||
statusText: e.status_text,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const FormCheck: React.FC<{
|
|||
label: string;
|
||||
name: string;
|
||||
checked: boolean;
|
||||
onChange: (e: any) => void;
|
||||
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
||||
disabled?: boolean;
|
||||
help?: string;
|
||||
}> = ({ label, name, checked, onChange, disabled, help }) => {
|
||||
|
|
@ -35,7 +35,7 @@ const FormInput: React.FC<{
|
|||
name: string;
|
||||
value: string | number;
|
||||
inputType: string;
|
||||
onChange: (e: any) => void;
|
||||
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
||||
disabled?: boolean;
|
||||
help?: string;
|
||||
}> = ({ label, name, value, inputType, onChange, disabled, help }) => {
|
||||
|
|
@ -76,9 +76,13 @@ export const ConfigModal: React.FC<{
|
|||
|
||||
const [error, setError] = useState<any | null>(null);
|
||||
|
||||
const handleInputChange = (e: any) => {
|
||||
const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {
|
||||
const name: string = e.target.name;
|
||||
const value: any = e.target.value;
|
||||
let value: string | number = e.target.value;
|
||||
if (e.target.type == "number") {
|
||||
value = e.target.valueAsNumber;
|
||||
}
|
||||
console.log(value, typeof value);
|
||||
const [mainField, subField] = name.split(".", 2);
|
||||
|
||||
if (subField) {
|
||||
|
|
@ -97,7 +101,9 @@ export const ConfigModal: React.FC<{
|
|||
}
|
||||
};
|
||||
|
||||
const handleToggleChange = (e: any) => {
|
||||
const handleToggleChange: React.ChangeEventHandler<HTMLInputElement> = (
|
||||
e
|
||||
) => {
|
||||
const name: string = e.target.name;
|
||||
const [mainField, subField] = name.split(".", 2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue