feat: download - download dwnload limieten in settings

This commit is contained in:
kodi
2026-03-14 13:38:44 +01:00
parent ea337338e3
commit 8ea2bd1498
12 changed files with 228 additions and 26 deletions
@@ -120,6 +120,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('id="rename-apply-btn"', body)
self.assertIn('id="settings-general-tab"', body)
self.assertIn('id="settings-interface-tab"', body)
self.assertIn('id="settings-downloads-tab"', body)
self.assertIn('id="settings-logs-tab"', body)
self.assertIn('id="settings-show-thumbnails"', body)
self.assertIn("Show thumbnails", body)
@@ -141,6 +142,13 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn("Preferred startup path (right)", body)
self.assertIn('id="settings-general-save-btn"', body)
self.assertIn('id="settings-interface-save-btn"', body)
self.assertIn('id="settings-downloads-panel"', body)
self.assertIn('id="settings-download-max-items"', body)
self.assertIn('id="settings-download-max-total-size"', body)
self.assertIn('id="settings-download-max-file-size"', body)
self.assertIn('id="settings-download-scan-timeout"', body)
self.assertIn('id="settings-download-symlink-policy"', body)
self.assertIn("ZIP download limits are shown for reference and cannot be changed here.", body)
self.assertIn('id="settings-logs-list"', body)
self.assertIn('id="viewer-content"', body)
self.assertIn('id="editor-modal"', body)
@@ -224,6 +232,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('function markZipDownloadReady(fileName)', app_js)
self.assertIn('function markZipDownloadFailed(err)', app_js)
self.assertIn('function closeDownloadModal()', app_js)
self.assertIn('function zipDownloadRequestKey(paths)', app_js)
self.assertIn('function contextMenuElements()', app_js)
self.assertIn('function openContextMenu(pane, entry, event)', app_js)
self.assertIn('function closeContextMenu()', app_js)
@@ -231,13 +240,16 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('async function downloadFileRequest(paths)', app_js)
self.assertIn('const zipDownload = isZipDownloadSelection(selectedItems);', app_js)
self.assertIn('openZipDownloadModal(selectedItems);', app_js)
self.assertIn('statusText: "preparing"', app_js)
self.assertIn('statusText: "packaging items"', app_js)
self.assertIn('statusText: "ready"', app_js)
self.assertIn('statusText: `failed: ${err.message}`', app_js)
self.assertIn('countText: "Step 1/3"', app_js)
self.assertIn('countText: "Step 2/3"', app_js)
self.assertIn('countText: "Step 3/3"', app_js)
self.assertIn('targetText: "Preparing download..."', app_js)
self.assertIn('statusText: "Preparing download..."', app_js)
self.assertIn('countText: "Preparing zip download"', app_js)
self.assertIn('countText: "Zip preflight and packaging"', app_js)
self.assertIn('statusText: "Download started"', app_js)
self.assertIn('countText: "Browser download started"', app_js)
self.assertIn('countText: "Zip download failed"', app_js)
self.assertIn('statusText: err.message || "Download failed"', app_js)
self.assertIn('downloadProgressState.requestKey === requestKey', app_js)
self.assertIn('setStatus("Preparing download...");', app_js)
self.assertIn('function applyContextMenuSelection()', app_js)
self.assertIn('function startContextMenuOpen()', app_js)
self.assertIn('function startContextMenuEdit()', app_js)
@@ -304,6 +316,12 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('settings.interfaceSaveButton.onclick = handleInterfaceSave;', app_js)
self.assertIn('preferredStartupPathLeft', app_js)
self.assertIn('preferredStartupPathRight', app_js)
self.assertIn('zipDownloadLimits', app_js)
self.assertIn('zip_download_limits', app_js)
self.assertIn('function renderDownloadSettings()', app_js)
self.assertIn('function formatBinarySize(bytes)', app_js)
self.assertIn('function formatSeconds(seconds)', app_js)
self.assertIn('function formatSymlinkPolicy(policy)', app_js)
self.assertIn('selected_theme', app_js)
self.assertIn('selected_color_mode', app_js)
self.assertNotIn("localStorage", app_js)
@@ -314,6 +332,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('paneState("right").currentPath = settingsState.preferredStartupPathRight || "/Volumes";', app_js)
self.assertIn('applyTheme(settingsState.selectedTheme, settingsState.selectedColorMode);', app_js)
self.assertIn('settings.interfaceTab.onclick = () => setSettingsTab("interface");', app_js)
self.assertIn('settings.downloadsTab.onclick = () => setSettingsTab("downloads");', app_js)
self.assertIn('"/api/settings"', app_js)
self.assertIn('function uploadElements()', app_js)
self.assertIn('function openUploadPicker()', app_js)