MCPcopy Create free account
hub / github.com/error311/FileRise / ensureCryptoTransferUiJob

Function ensureCryptoTransferUiJob

public/js/folderManager.js:3076–3097  ·  view source on GitHub ↗
(folder, mode, totalFiles = 0, totalBytes = 0)

Source from the content-addressed store, hash-verified

3074}
3075
3076function ensureCryptoTransferUiJob(folder, mode, totalFiles = 0, totalBytes = 0) {
3077 if (__cryptoTransferUiJob) return __cryptoTransferUiJob;
3078
3079 const act = mode === 'decrypt' ? 'Decrypting' : 'Encrypting';
3080 const folderLabel = folder || 'root';
3081 const fileCount = Number.isFinite(totalFiles) ? Math.max(0, Number(totalFiles)) : 0;
3082 const byteTotal = Number.isFinite(totalBytes) ? Math.max(0, Number(totalBytes)) : 0;
3083
3084 __cryptoTransferUiJob = startTransferProgress({
3085 action: act,
3086 title: `${act} ${folderLabel}`,
3087 subText: 'Running in the background. You can keep using FileRise.',
3088 itemCount: fileCount,
3089 itemLabel: fileCount === 1 ? 'file' : 'files',
3090 totalBytes: byteTotal,
3091 bytesKnown: byteTotal > 0,
3092 indeterminate: byteTotal <= 0 && fileCount <= 0,
3093 state: 'running'
3094 });
3095
3096 return __cryptoTransferUiJob;
3097}
3098
3099function renderCryptoJobUi({ folder, mode, job }) {
3100 ensureCryptoJobUi();

Callers 2

renderCryptoJobUiFunction · 0.85
startCryptoRunnerFunction · 0.85

Calls 1

startTransferProgressFunction · 0.85

Tested by

no test coverage detected