feat: implement native HTTP downloader option and enhance download management

This commit is contained in:
Moyasee
2026-01-06 17:41:05 +02:00
parent 7e7390885e
commit 77af7509ac
8 changed files with 752 additions and 56 deletions

View File

@@ -53,6 +53,7 @@ export function SettingsGeneral() {
achievementSoundVolume: 15,
language: "",
customStyles: window.localStorage.getItem("customStyles") || "",
useNativeHttpDownloader: false,
});
const [languageOptions, setLanguageOptions] = useState<LanguageOption[]>([]);
@@ -131,6 +132,8 @@ export function SettingsGeneral() {
friendStartGameNotificationsEnabled:
userPreferences.friendStartGameNotificationsEnabled ?? true,
language: language ?? "en",
useNativeHttpDownloader:
userPreferences.useNativeHttpDownloader ?? false,
}));
}
}, [userPreferences, defaultDownloadsPath]);
@@ -248,6 +251,18 @@ export function SettingsGeneral() {
}))}
/>
<h2 className="settings-general__section-title">{t("downloads")}</h2>
<CheckboxField
label={t("use_native_http_downloader")}
checked={form.useNativeHttpDownloader}
onChange={() =>
handleChange({
useNativeHttpDownloader: !form.useNativeHttpDownloader,
})
}
/>
<h2 className="settings-general__section-title">{t("notifications")}</h2>
<CheckboxField