Files
Multi-Hoster-Upload/lib/settings-import-gate.js
T
Sucukdeluxe 76a228fb7c release: v2.0.6
Redesign the desktop workspace with task sidebars, live filters, clearer settings, and an accessible update dialog.

Harden encrypted backup imports, configuration persistence, history retention, queue snapshots, shutdown recovery, and update installation ordering.

Publish verified Windows artifacts and refreshed English documentation.
2026-08-10 09:28:28 +02:00

20 lines
594 B
JavaScript

function createSettingsImportGate(isUploadRunning) {
if (typeof isUploadRunning !== 'function') throw new TypeError('isUploadRunning must be a function');
let importing = false;
return {
begin() {
if (importing) throw new Error('Einstellungen werden bereits importiert');
if (isUploadRunning()) throw new Error('Während laufender Uploads können keine Einstellungen importiert werden');
importing = true;
},
end() {
importing = false;
},
canStartUpload() {
return !importing;
}
};
}
module.exports = { createSettingsImportGate };