Files
Multi-Hoster-Upload/renderer/history-status.js
T
Sucukdeluxe 26dcf9c698 release: v2.1.12 reliability and security hardening
Verify update artifacts with exact metadata and SHA-512, require host-confirmed upload completion before cleanup, harden credentials and backups, improve queue recovery and skipped-state reporting, expand Windows path coverage, and add CI packaging checks.
2026-08-11 22:36:20 +02:00

23 lines
883 B
JavaScript

(function (root, factory) {
const api = factory();
if (typeof module === 'object' && module.exports) module.exports = api;
if (root) root.HistoryStatus = api;
})(typeof globalThis !== 'undefined' ? globalThis : this, function () {
function classifyHistoryStatus(status) {
if (status === 'done') return 'success';
if (status === 'skipped') return 'skipped';
return 'error';
}
function historyDetail(result) {
const category = classifyHistoryStatus(result?.status);
if (category === 'success') return String(result?.download_url || result?.embed_url || '');
if (result?.error || result?.message) return String(result.error || result.message);
if (result?.status === 'aborted') return 'Abgebrochen';
if (category === 'skipped') return 'Übersprungen';
return 'Fehlgeschlagen';
}
return { classifyHistoryStatus, historyDetail };
});