diff options
| author | 2026-01-14 13:35:25 +0800 | |
|---|---|---|
| committer | 2026-01-14 13:35:25 +0800 | |
| commit | 41eb19b2e7358017918a78eb8fa59bfbf2e05918 (patch) | |
| tree | 81e06a0e38eab4259b274c3f0c30b7da823a86f0 /ui | |
| parent | b21df2f9abb9c8d5da0b77f2d3756802f95a1ad2 (diff) | |
| download | DropOut-41eb19b2e7358017918a78eb8fa59bfbf2e05918.tar.gz DropOut-41eb19b2e7358017918a78eb8fa59bfbf2e05918.zip | |
feat: add download settings for concurrent download threads
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/src/components/SettingsView.svelte | 23 | ||||
| -rw-r--r-- | ui/src/stores/settings.svelte.ts | 1 | ||||
| -rw-r--r-- | ui/src/types/index.ts | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/ui/src/components/SettingsView.svelte b/ui/src/components/SettingsView.svelte index 9f260c1..fc4fe46 100644 --- a/ui/src/components/SettingsView.svelte +++ b/ui/src/components/SettingsView.svelte @@ -117,6 +117,29 @@ </div> </div> + <!-- Download Settings --> + <div class="bg-zinc-800/50 p-6 rounded-lg border border-zinc-700"> + <h3 + class="block text-sm font-bold text-zinc-400 mb-4 uppercase tracking-wide" + >Download Settings</h3> + <div> + <label for="download-threads" class="block text-xs text-zinc-500 mb-1" + >Concurrent Download Threads</label + > + <input + id="download-threads" + bind:value={settingsState.settings.download_threads} + type="number" + min="1" + max="128" + class="bg-zinc-950 text-white w-full p-3 rounded border border-zinc-700 focus:border-indigo-500 outline-none" + /> + <p class="text-xs text-zinc-500 mt-2"> + Number of files to download simultaneously. Higher values can speed up downloads but may consume more bandwidth. Recommended: 16-64 + </p> + </div> + </div> + <div class="pt-4"> <button onclick={() => settingsState.saveSettings()} diff --git a/ui/src/stores/settings.svelte.ts b/ui/src/stores/settings.svelte.ts index 989172c..397b9a6 100644 --- a/ui/src/stores/settings.svelte.ts +++ b/ui/src/stores/settings.svelte.ts @@ -9,6 +9,7 @@ export class SettingsState { java_path: "java", width: 854, height: 480, + download_threads: 32, }); javaInstallations = $state<JavaInstallation[]>([]); isDetectingJava = $state(false); diff --git a/ui/src/types/index.ts b/ui/src/types/index.ts index b7ff0a0..1f83585 100644 --- a/ui/src/types/index.ts +++ b/ui/src/types/index.ts @@ -29,6 +29,7 @@ export interface LauncherConfig { java_path: string; width: number; height: number; + download_threads: number; } export interface JavaInstallation { |