MCPcopy
hub / github.com/perkeep/perkeep / getText

Function getText

server/perkeepd/ui/index.js:1778–1799  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1776 }
1777
1778 function getText() {
1779 // TODO: It does not have to be a div (it could be just
1780 // a string), but it's easier to make it a div than to
1781 // figure out the CSS to display it on its own line,
1782 // horizontally centered.
1783 return React.DOM.div(
1784 {},
1785 function() {
1786 if (this.isAddingMembers_()) {
1787 return goog.string.subs('%s of %s items added',
1788 this.state.nodesAlreadyAdded,
1789 this.state.totalNodesToAdd);
1790 } else if (this.isUploading_()) {
1791 return goog.string.subs('Uploaded %s (%s%)',
1792 goog.format.numBytesToString(this.state.totalBytesComplete, 2),
1793 getUploadProgressPercent.call(this));
1794 } else {
1795 return 'Drop files here to upload,';
1796 }
1797 }.call(this)
1798 )
1799 }
1800
1801 function getUploadProgressPercent() {
1802 if (!this.state.totalBytesToUpload) {

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected