feat(desktop): modernize download core and type IPC

Replace shared download locking with a Tokio coordinator actor and async streamed file writes.

Generate TypeScript IPC payload types from Rust and route frontend commands and events through typed wrappers.
This commit is contained in:
NimBold
2026-06-14 17:38:16 +03:30
parent 77fdc30b80
commit f806fd2cbf
40 changed files with 1360 additions and 425 deletions
@@ -124,13 +124,13 @@ export const PropertiesModal = () => {
fileName,
destination: saveLocation,
connections: Number(connections),
speedLimit: speedLimitEnabled && speedLimitValue ? `${speedLimitValue}K` : null,
username: loginMode === 'custom' ? username.trim() : null,
password: loginMode === 'custom' ? password.trim() : null,
headers: headers.trim() || null,
checksum: checksumEnabled && checksumValue.trim() ? `${checksumAlgorithm}=${checksumValue.trim()}` : null,
cookies: cookies.trim() || null,
mirrors: mirrors.trim() || null,
speedLimit: speedLimitEnabled && speedLimitValue ? `${speedLimitValue}K` : undefined,
username: loginMode === 'custom' ? username.trim() : undefined,
password: loginMode === 'custom' ? password.trim() : undefined,
headers: headers.trim() || undefined,
checksum: checksumEnabled && checksumValue.trim() ? `${checksumAlgorithm}=${checksumValue.trim()}` : undefined,
cookies: cookies.trim() || undefined,
mirrors: mirrors.trim() || undefined,
};
updateDownload(item.id, updates);