Misc Cleanup
This commit is contained in:
@@ -356,7 +356,6 @@ class Uploads {
|
|||||||
pinRemoving.methods.RemoveHostingContract(hostingAddress, contentHash).send(tx, function (error, result) {
|
pinRemoving.methods.RemoveHostingContract(hostingAddress, contentHash).send(tx, function (error, result) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
if (result) {
|
if (result) {
|
||||||
//$('#minedBlockTrackerModal').modal('open');
|
|
||||||
EthoUploads.waitForReceipt(result, function (receipt) {
|
EthoUploads.waitForReceipt(result, function (receipt) {
|
||||||
console.log("Transaction Has Been Mined: " + receipt);
|
console.log("Transaction Has Been Mined: " + receipt);
|
||||||
$('#minedBlockTrackerModal').iziModal('close');
|
$('#minedBlockTrackerModal').iziModal('close');
|
||||||
@@ -643,8 +642,6 @@ class Uploads {
|
|||||||
var table = document.getElementById("contract-detail-table");
|
var table = document.getElementById("contract-detail-table");
|
||||||
var row = table.insertRow(count + 10);
|
var row = table.insertRow(count + 10);
|
||||||
var cell1 = row.insertCell(0);
|
var cell1 = row.insertCell(0);
|
||||||
//var cell2 = row.insertCell(1);
|
|
||||||
//cell1.innerHTML = ethoFSHostingContractPath;
|
|
||||||
cell1.innerHTML = '<a href="http://data.ethofs.com/ipfs/' + ethoFSHostingContractHash + '" target="_blank" style="word-break: break-word">' + ethoFSHostingContractHash + '</a>';
|
cell1.innerHTML = '<a href="http://data.ethofs.com/ipfs/' + ethoFSHostingContractHash + '" target="_blank" style="word-break: break-word">' + ethoFSHostingContractHash + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -910,20 +907,16 @@ class Uploads {
|
|||||||
const streamFiles = (files) => {
|
const streamFiles = (files) => {
|
||||||
const stream = node.addReadableStream()
|
const stream = node.addReadableStream()
|
||||||
stream.on('data', function (data) {
|
stream.on('data', function (data) {
|
||||||
//console.log("Data...");
|
|
||||||
//console.log(data);
|
|
||||||
GlobalHashArray.push(`${data.hash}`);
|
GlobalHashArray.push(`${data.hash}`);
|
||||||
GlobalSizeArray.push(`${data.size}`);
|
GlobalSizeArray.push(`${data.size}`);
|
||||||
GlobalPathArray.push(`${data.path}`);
|
GlobalPathArray.push(`${data.path}`);
|
||||||
GlobalUploadHash = `${data.hash}`;
|
GlobalUploadHash = `${data.hash}`;
|
||||||
GlobalUploadPath = `${data.path}`;
|
GlobalUploadPath = `${data.path}`;
|
||||||
console.log("Path: " + data.path + " Hash: " + data.hash);
|
console.log("Path: " + data.path + " Hash: " + data.hash);
|
||||||
//var comparePath = data.path.replace(pathSymbol, "/");
|
|
||||||
var comparePath = data.path.replace(/\\/g, '/');
|
var comparePath = data.path.replace(/\\/g, '/');
|
||||||
console.log("Compare Path: " + comparePath);
|
console.log("Compare Path: " + comparePath);
|
||||||
var splitString = comparePath.split("/")
|
var splitString = comparePath.split("/")
|
||||||
if (splitString.length == 1 || splitString[0] == "") {
|
if (splitString.length == 1 || splitString[0] == "") {
|
||||||
//if (splitString.length == 1) {
|
|
||||||
streamFinishCount++;
|
streamFinishCount++;
|
||||||
GlobalMainHashArray.push(`${data.hash}`);
|
GlobalMainHashArray.push(`${data.hash}`);
|
||||||
GlobalMainPathArray.push(`${data.path}`);
|
GlobalMainPathArray.push(`${data.path}`);
|
||||||
@@ -1361,10 +1354,6 @@ class Uploads {
|
|||||||
$logs.innerHTML = msg
|
$logs.innerHTML = msg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//window.onerror = EthoUploads.onError
|
|
||||||
|
|
||||||
|
|
||||||
updateView(state, ipfs) {
|
updateView(state, ipfs) {
|
||||||
if (states[state] !== undefined) {
|
if (states[state] !== undefined) {
|
||||||
states[state]()
|
states[state]()
|
||||||
@@ -1374,13 +1363,6 @@ class Uploads {
|
|||||||
}
|
}
|
||||||
|
|
||||||
startApplication() {
|
startApplication() {
|
||||||
// Setup event listeners
|
|
||||||
//document.getElementById("drag-container").addEventListener('dragenter', EthoUploads.onDragEnter)
|
|
||||||
//document.getElementById("drag-container").addEventListener('dragover', EthoUploads.onDragEnter)
|
|
||||||
//document.getElementById("drag-container").addEventListener('drop', EthoUploads.onDrop)
|
|
||||||
//document.getElementById("drag-container").addEventListener('dragleave', EthoUploads.onDragLeave)
|
|
||||||
//document.getElementById("fileUploadButton").addEventListener("change", EthoUploads.onFileUpload)
|
|
||||||
//start()
|
|
||||||
window.startNode()
|
window.startNode()
|
||||||
EthoUploads.extendedStartApplication()
|
EthoUploads.extendedStartApplication()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user