diff --git a/web/.eslintcache b/web/.eslintcache index 0159507..2c61693 100644 --- a/web/.eslintcache +++ b/web/.eslintcache @@ -1 +1 @@ -[{"/home/yourok/MEGAWork/go/TorrServer/web/src/index.js":"1","/home/yourok/MEGAWork/go/TorrServer/web/src/App.js":"2","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js":"3","/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js":"4","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js":"5","/home/yourok/MEGAWork/go/TorrServer/web/src/components/About.js":"6","/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js":"7","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js":"8","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js":"9","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js":"10","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js":"11","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js":"12","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js":"13","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js":"14","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js":"15"},{"size":224,"mtime":1607328766846,"results":"16","hashOfConfig":"17"},{"size":840,"mtime":1607329513826,"results":"18","hashOfConfig":"17"},{"size":6554,"mtime":1613655748479,"results":"19","hashOfConfig":"17"},{"size":1568,"mtime":1607340137621,"results":"20","hashOfConfig":"17"},{"size":1348,"mtime":1607335733737,"results":"21","hashOfConfig":"17"},{"size":2278,"mtime":1608810011199,"results":"22","hashOfConfig":"17"},{"size":1416,"mtime":1607335705443,"results":"23","hashOfConfig":"17"},{"size":3345,"mtime":1607335694784,"results":"24","hashOfConfig":"17"},{"size":3722,"mtime":1613656423500,"results":"25","hashOfConfig":"17"},{"size":737,"mtime":1611058762156,"results":"26","hashOfConfig":"17"},{"size":8518,"mtime":1613802993837,"results":"27","hashOfConfig":"17"},{"size":7045,"mtime":1611125839869,"results":"28","hashOfConfig":"17"},{"size":5798,"mtime":1611126720480,"results":"29","hashOfConfig":"17"},{"size":4141,"mtime":1612243960826,"results":"30","hashOfConfig":"17"},{"size":428,"mtime":1607431364533,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"17eruzz",{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"58","messages":"59","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/yourok/MEGAWork/go/TorrServer/web/src/index.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/App.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/About.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js",["62"],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js",["63","64","65","66"],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js",["67"],"/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js",[],{"ruleId":"68","severity":1,"message":"69","line":103,"column":29,"nodeType":"70","endLine":103,"endColumn":35},{"ruleId":"71","severity":1,"message":"72","line":32,"column":24,"nodeType":"73","messageId":"74","endLine":32,"endColumn":26},{"ruleId":"75","severity":1,"message":"76","line":34,"column":8,"nodeType":"77","endLine":34,"endColumn":35,"suggestions":"78"},{"ruleId":"71","severity":1,"message":"72","line":55,"column":30,"nodeType":"73","messageId":"74","endLine":55,"endColumn":32},{"ruleId":"71","severity":1,"message":"72","line":100,"column":13,"nodeType":"73","messageId":"74","endLine":100,"endColumn":15},{"ruleId":"79","severity":1,"message":"80","line":74,"column":31,"nodeType":"81","messageId":"82","endLine":81,"endColumn":10},"jsx-a11y/heading-has-content","Headings must have content and the content must be accessible by a screen reader.","JSXOpeningElement","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'torrent.preload_size', 'torrent.preloaded_bytes', and 'torrent.stat'. Either include them or remove the dependency array. You can also replace multiple useState variables with useReducer if 'setProgress' needs the current value of 'torrent.preloaded_bytes'.","ArrayExpression",["83"],"no-loop-func","Function declared in a loop contains unsafe references to variable(s) 'html', 'html'.","ArrowFunctionExpression","unsafeRefs",{"desc":"84","fix":"85"},"Update the dependencies array to be: [props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]",{"range":"86","text":"87"},[1081,1108],"[props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]"] \ No newline at end of file +[{"/space/Projects/GO/TorrServer/web/src/index.js":"1","/space/Projects/GO/TorrServer/web/src/App.js":"2","/space/Projects/GO/TorrServer/web/src/components/Appbar.js":"3","/space/Projects/GO/TorrServer/web/src/components/RemoveAll.js":"4","/space/Projects/GO/TorrServer/web/src/components/About.js":"5","/space/Projects/GO/TorrServer/web/src/components/TorrentList.js":"6","/space/Projects/GO/TorrServer/web/src/components/Add.js":"7","/space/Projects/GO/TorrServer/web/src/components/Settings.js":"8","/space/Projects/GO/TorrServer/web/src/components/Donate.js":"9","/space/Projects/GO/TorrServer/web/src/components/Upload.js":"10","/space/Projects/GO/TorrServer/web/src/utils/Hosts.js":"11","/space/Projects/GO/TorrServer/web/src/components/Torrent.js":"12","/space/Projects/GO/TorrServer/web/src/utils/Utils.js":"13","/space/Projects/GO/TorrServer/web/src/components/DialogTorrentInfo.js":"14","/space/Projects/GO/TorrServer/web/src/components/DialogCacheInfo.js":"15"},{"size":224,"mtime":1609258964582,"results":"16","hashOfConfig":"17"},{"size":840,"mtime":1609258964578,"results":"18","hashOfConfig":"17"},{"size":6554,"mtime":1609258964578,"results":"19","hashOfConfig":"17"},{"size":1416,"mtime":1609258964582,"results":"20","hashOfConfig":"17"},{"size":2278,"mtime":1609258964578,"results":"21","hashOfConfig":"17"},{"size":1568,"mtime":1609258964582,"results":"22","hashOfConfig":"17"},{"size":3345,"mtime":1609258964578,"results":"23","hashOfConfig":"17"},{"size":8518,"mtime":1614192195683,"results":"24","hashOfConfig":"17"},{"size":3722,"mtime":1613664604547,"results":"25","hashOfConfig":"17"},{"size":1348,"mtime":1609258964582,"results":"26","hashOfConfig":"17"},{"size":737,"mtime":1609258964582,"results":"27","hashOfConfig":"17"},{"size":7140,"mtime":1614194766658,"results":"28","hashOfConfig":"17"},{"size":419,"mtime":1614194039304,"results":"29","hashOfConfig":"17"},{"size":5825,"mtime":1614194596555,"results":"30","hashOfConfig":"17"},{"size":4141,"mtime":1612203834458,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1kl0wtl",{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/space/Projects/GO/TorrServer/web/src/index.js",[],"/space/Projects/GO/TorrServer/web/src/App.js",[],"/space/Projects/GO/TorrServer/web/src/components/Appbar.js",[],"/space/Projects/GO/TorrServer/web/src/components/RemoveAll.js",[],"/space/Projects/GO/TorrServer/web/src/components/About.js",[],"/space/Projects/GO/TorrServer/web/src/components/TorrentList.js",[],"/space/Projects/GO/TorrServer/web/src/components/Add.js",[],"/space/Projects/GO/TorrServer/web/src/components/Settings.js",["62"],"/space/Projects/GO/TorrServer/web/src/components/Donate.js",[],"/space/Projects/GO/TorrServer/web/src/components/Upload.js",[],"/space/Projects/GO/TorrServer/web/src/utils/Hosts.js",[],"/space/Projects/GO/TorrServer/web/src/components/Torrent.js",[],"/space/Projects/GO/TorrServer/web/src/utils/Utils.js",[],"/space/Projects/GO/TorrServer/web/src/components/DialogTorrentInfo.js",["63","64","65","66"],"/space/Projects/GO/TorrServer/web/src/components/DialogCacheInfo.js",["67"],{"ruleId":"68","severity":1,"message":"69","line":103,"column":29,"nodeType":"70","endLine":103,"endColumn":35},{"ruleId":"71","severity":1,"message":"72","line":32,"column":24,"nodeType":"73","messageId":"74","endLine":32,"endColumn":26},{"ruleId":"75","severity":1,"message":"76","line":34,"column":8,"nodeType":"77","endLine":34,"endColumn":35,"suggestions":"78"},{"ruleId":"71","severity":1,"message":"72","line":55,"column":30,"nodeType":"73","messageId":"74","endLine":55,"endColumn":32},{"ruleId":"71","severity":1,"message":"72","line":100,"column":13,"nodeType":"73","messageId":"74","endLine":100,"endColumn":15},{"ruleId":"79","severity":1,"message":"80","line":74,"column":31,"nodeType":"81","messageId":"82","endLine":81,"endColumn":10},"jsx-a11y/heading-has-content","Headings must have content and the content must be accessible by a screen reader.","JSXOpeningElement","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'torrent.preload_size', 'torrent.preloaded_bytes', and 'torrent.stat'. Either include them or remove the dependency array. You can also replace multiple useState variables with useReducer if 'setProgress' needs the current value of 'torrent.preloaded_bytes'.","ArrayExpression",["83"],"no-loop-func","Function declared in a loop contains unsafe references to variable(s) 'html', 'html'.","ArrowFunctionExpression","unsafeRefs",{"desc":"84","fix":"85"},"Update the dependencies array to be: [props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]",{"range":"86","text":"87"},[1081,1108],"[props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]"] \ No newline at end of file diff --git a/web/src/utils/Utils.js b/web/src/utils/Utils.js index c4e8305..9e3bd89 100644 --- a/web/src/utils/Utils.js +++ b/web/src/utils/Utils.js @@ -5,6 +5,6 @@ export function humanizeSize(size) { } export function getPeerString(torrent) { - if (!torrent || !torrent.connected_seeders) return '[0] 0 / 0' + if (!torrent || !torrent.connected_seeders) return '' return '[' + torrent.connected_seeders + '] ' + torrent.active_peers + ' / ' + torrent.total_peers }