import { api } from '../api.js'; import { showToast } from '../components/toast.js'; import { esc } from '../utils.js'; function formatFileSize(bytes) { if (!bytes) return '--'; if (bytes >= 1073741824) return `${(bytes / 1073741824).toFixed(1)} GB`; if (bytes >= 1048576) return `${(bytes / 1048576).toFixed(1)} MB`; if (bytes >= 1024) return `${(bytes / 1024).toFixed(0)} KB`; return `${bytes} B`; } export function render(container) { container.innerHTML = `
Upload videos and images to get started.
${esc(err.message)}
Leave empty to keep current file