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

Function buildSub

public/js/transferProgress.js:406–420  ·  view source on GitHub ↗
(job)

Source from the content-addressed store, hash-verified

404}
405
406function buildSub(job) {
407 if (job.subText) return job.subText;
408 const hasSource = typeof job.source === 'string' && job.source.trim() !== '';
409 const hasDestination = typeof job.destination === 'string' && job.destination.trim() !== '';
410 if (!hasSource && !hasDestination) return '';
411
412 const source = formatLocationLabel(job.source);
413 const destination = formatLocationLabel(job.destination);
414 if (hasSource && hasDestination) {
415 if (source === destination) return '';
416 return `${source} -> ${destination}`;
417 }
418 if (hasDestination) return `To ${destination}`;
419 return `From ${source}`;
420}
421
422function setMinimized(min) {
423 _minimized = !!min;

Callers 1

renderJobFunction · 0.85

Calls 1

formatLocationLabelFunction · 0.85

Tested by

no test coverage detected