Main ethoFS Code Reorganization - Phantom Modals Fix
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -70,12 +70,12 @@ function start() {
|
||||
|
||||
window.info = id
|
||||
console.log("Getting ethoFS Node ID...");
|
||||
subscribeToHealthChannel()
|
||||
updateView('ready', window.node)
|
||||
onSuccess('Node is ready.')
|
||||
setInterval(refreshPeerList, 10000)
|
||||
EthoUploads.subscribeToHealthChannel()
|
||||
EthoUploads.updateView('ready', window.node)
|
||||
EthoUploads.onSuccess('Node is ready.')
|
||||
setInterval(EthoUploads.refreshPeerList, 10000)
|
||||
})
|
||||
.catch((error) => onError(error))
|
||||
.catch((error) => EthoUploads.onError(error))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ function start() {
|
||||
|
||||
window.info = id
|
||||
console.log("Getting ethoFS Node ID...");
|
||||
subscribeToHealthChannel()
|
||||
updateView('ready', window.node)
|
||||
onSuccess('Node is ready.')
|
||||
setInterval(refreshPeerList, 10000)
|
||||
EthoUploads.subscribeToHealthChannel()
|
||||
EthoUploads.updateView('ready', window.node)
|
||||
EthoUploads.onSuccess('Node is ready.')
|
||||
setInterval(EthoUploads.refreshPeerList, 10000)
|
||||
})
|
||||
.catch((error) => onError(error))
|
||||
.catch((error) => EthoUploads.onError(error))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<head>
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet"
|
||||
type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
<!-- Bootstrap Core Css -->
|
||||
<link href="assets/dashboard/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<!--<link href="assets/dashboard/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">-->
|
||||
<!-- Waves Effect Css -->
|
||||
<link href="assets/dashboard/plugins/node-waves/waves.css" rel="stylesheet" />
|
||||
<!-- Animation Css -->
|
||||
@@ -12,7 +13,8 @@
|
||||
<link href="assets/dashboard/plugins/morrisjs/morris.css" rel="stylesheet" />-->
|
||||
<!-- Custom Css -->
|
||||
<link href="assets/dashboard/css/style.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css">
|
||||
<!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
|
||||
<link href="assets/dashboard/css/themes/all-themes.css" rel="stylesheet" />
|
||||
<script src="https://medium-widget.pixelpoint.io/widget.js"></script>
|
||||
@@ -128,11 +130,12 @@
|
||||
|
||||
</div>
|
||||
<center>
|
||||
<button type="button" class="btn bg-indigo waves-effect" id="main-upload-button" data-toggle="modal" data-target="#defaultModal" onclick="resetUploadProcess();">
|
||||
<button type="button" class="btn bg-indigo waves-effect" id="main-upload-button" data-toggle="modal"
|
||||
data-target="#defaultModal">
|
||||
<i class="material-icons">cloud_upload</i>
|
||||
<span>Upload to ethoFS</span>
|
||||
</button>
|
||||
<button type="button" class="btn bg-indigo waves-effect" id="main-login-button" data-toggle="modal" data-target="#ethofsLoginModal" onclick="checkLogin();">
|
||||
<button type="button" class="btn bg-indigo waves-effect" id="main-login-button">
|
||||
<i class="material-icons">fingerprint</i>
|
||||
<span>Login To ethoFS</span>
|
||||
</button>
|
||||
@@ -195,14 +198,15 @@
|
||||
</tr>
|
||||
<tr style="border-color:#000;">
|
||||
<td data-th="Private Key">
|
||||
<input type="text" id="privatekey" name="privatekey" placeholder="Enter Private Key" style="color:White;">
|
||||
<input type="text" id="privatekey" name="privatekey" placeholder="Enter Private Key"
|
||||
style="color:White;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #840032;">
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal" id="ethofs-login-button" onclick="ethofsLogin(document.getElementById('privatekey').value);">LOGIN</button>
|
||||
<button type="button" class="btn btn-link waves-effect" id="ethofs-login-button">LOGIN</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -235,7 +239,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #840032;">
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal" id="ethofs-registration-button" onclick="AddNewUser(document.getElementById('username').value);">REGISTER</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal" id="ethofs-registration-button">REGISTER</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,7 +285,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-toggle="modal" data-dismiss="modal" data-target="#defaultModal2">NEXT</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-toggle="modal" data-dismiss="modal"
|
||||
data-target="#defaultModal2">NEXT</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -306,7 +311,8 @@
|
||||
box to upload.
|
||||
</p>
|
||||
</center>
|
||||
<input type="file" id="fileUploadButton" webkitdirectory="true" mozdirectory="true" msdirectory="true" odirectory="true" directory="true" multiple="true">
|
||||
<input type="file" id="fileUploadButton" webkitdirectory="true" mozdirectory="true" msdirectory="true"
|
||||
odirectory="true" directory="true" multiple="true">
|
||||
</div>
|
||||
<div id="progress-container">
|
||||
<div id="progress-bar"></div>
|
||||
@@ -325,7 +331,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-toggle="modal" data-dismiss="modal" data-target="#defaultModal3" onclick="resetUploadModal();">NEXT</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-toggle="modal" data-dismiss="modal"
|
||||
data-target="#defaultModal3" id="confirm-files-button">NEXT</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,7 +354,8 @@
|
||||
</tr>
|
||||
<tr style="border-color:#000;">
|
||||
<td data-th="Contract Name">
|
||||
<input type="text" id="newcontractname" name="newcontractname" placeholder="Enter Contract Name" style="color:white;">
|
||||
<input type="text" id="newcontractname" name="newcontractname" placeholder="Enter Contract Name"
|
||||
style="color:white;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -365,7 +373,7 @@
|
||||
<tr>
|
||||
<th>Contract Duration (Blocks)</th>
|
||||
<td data-th="Contract Duration (Blocks)">
|
||||
<select id="contract-duration" onchange="contractDurationChange(this);">
|
||||
<select id="contract-duration">
|
||||
<option value="100000" selected="selected">100000</option>
|
||||
<option value="200000">200000</option>
|
||||
<option value="300000">300000</option>
|
||||
@@ -391,7 +399,8 @@
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal" id="upload-confirm-button" data-target="#preparingUploadModal" onclick="startUploadProcess();">CONFIRM</button>
|
||||
<button type="button" class="btn btn-link waves-effect" data-dismiss="modal"
|
||||
id="upload-confirm-button" data-target="#preparingUploadModal">CONFIRM</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@@ -404,7 +413,7 @@
|
||||
<div class="modal-content" style="background-color: #840032;">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="defaultModalLabel" style="color:white;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color:#ffffff;" onclick="updateContractTable();">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color:#ffffff;" id="tracker-close-button">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<br>
|
||||
@@ -423,24 +432,28 @@
|
||||
<h3 style="padding-left:10px;">Message Log:</h3>
|
||||
<span class="upload-message" style="color: #3CB371; font-size: 24px; padding: 10px"></span>
|
||||
</div>
|
||||
<div class="summary" style="text-align: center !important; padding: 10px; width:100%; background: #000000;">
|
||||
<div class="summary"
|
||||
style="text-align: center !important; padding: 10px; width:100%; background: #000000;">
|
||||
<div id="myBar">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<button type="button" class="btn btn-primary" id="upload-check-button" onclick="finishUploadModal(); event.stopPropagation();">Close</button>
|
||||
<div class="modal-footer"
|
||||
style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<button type="button" class="btn btn-primary" id="upload-check-button" onclick="event.stopPropagation();">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="analyzeDataModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal fade" id="analyzeDataModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel"
|
||||
aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="background-color: #840032;">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="defaultModalLabel" style="color:white;">
|
||||
<button type="button" class="close" data-dismiss="modal" id="analyze-close-button" aria-label="Close" style="color:#ffffff;">
|
||||
<button type="button" class="close" data-dismiss="modal" id="analyze-close-button" aria-label="Close"
|
||||
style="color:#ffffff;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<br>
|
||||
@@ -460,14 +473,17 @@
|
||||
<h4 style="padding-left:10px;">Message Log:</h4>
|
||||
<pre class="analyze-message" style="color: #3CB371; font-size: 24px;"></pre>
|
||||
</div>
|
||||
<div class="summary" style="text-align: center !important; padding: 10px; width:100%; background: #000000;">
|
||||
<div class="summary"
|
||||
style="text-align: center !important; padding: 10px; width:100%; background: #000000;">
|
||||
<div id="myAnalyzeBar">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer" style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<button type="button" class="btn btn-primary" id="upload-check-button" onclick="finishUploadModal(); event.stopPropagation();">Close</button>
|
||||
<div class="modal-footer"
|
||||
style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<button type="button" class="btn btn-primary" id="upload-check-button"
|
||||
onclick="event.stopPropagation();">Close</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@@ -477,7 +493,8 @@
|
||||
<!-- end analyze data modal -->
|
||||
|
||||
<!-- begin mined block checking modal -->
|
||||
<div class="modal fade" id="minedBlockTrackerModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal fade" id="minedBlockTrackerModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel"
|
||||
aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="background-color: #840032;">
|
||||
<div class="modal-header">
|
||||
@@ -495,7 +512,8 @@
|
||||
<main>
|
||||
<div class="box node" style="width:100%; background: #000000; background-color: #000;">
|
||||
<h3 style="padding: 20px;">Ether-1 Transaction Status:
|
||||
<span id="mining-status-message" style="color: #3CB371; font-size: 24px; text-align: center !important;">In
|
||||
<span id="mining-status-message"
|
||||
style="color: #3CB371; font-size: 24px; text-align: center !important;">In
|
||||
Progress</span>
|
||||
</h3>
|
||||
<div>
|
||||
@@ -504,7 +522,8 @@
|
||||
<span class="mining-message" id="mining-message" style="color: #3CB371; font-size: 24px;"></span>
|
||||
</center>
|
||||
</div>
|
||||
<div class="summary" style="text-align: center !important; padding: 20px; width:100%; background: #000000;">
|
||||
<div class="summary"
|
||||
style="text-align: center !important; padding: 20px; width:100%; background: #000000;">
|
||||
<h3 style="font-size: 24px;">Current Ether-1 Block Height:
|
||||
      
|
||||
<span id="block-height" style="color: #3CB371; font-size: 24px;">0</span>
|
||||
@@ -519,7 +538,8 @@
|
||||
<!-- end mined block checking modal -->
|
||||
|
||||
<!-- begin preparing upload modal -->
|
||||
<div class="modal fade" id="preparingUploadModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal fade" id="preparingUploadModal" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel"
|
||||
aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="background-color: #840032;">
|
||||
<div class="modal-header">
|
||||
@@ -554,7 +574,7 @@
|
||||
<!-- end preparing upload modal -->
|
||||
|
||||
<!-- begin contract detail modal -->
|
||||
<div class="modal fade" id="contractDetailModal" tabindex="-1" role="dialog" style="padding-top:260px">
|
||||
<div class="modal fade" id="contractDetailModal" tabindex="-1" role="dialog" style="padding-top:0px">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="background-color: #840032;">
|
||||
<div class="modal-header">
|
||||
@@ -624,7 +644,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-th="Contract Duration (Blocks)">
|
||||
<select class="js-select22" name="extend-contract" id="extend-contract" onchange="contractExtensionChange(this);">
|
||||
<select class="js-select22" name="extend-contract" id="extend-contract">
|
||||
<option value="100000" selected="selected">100000
|
||||
- 15 Days
|
||||
</option>
|
||||
@@ -665,10 +685,11 @@
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<div class="modal-footer"
|
||||
style="background-color: #840032; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color:#000">
|
||||
<div class="row clearfix">
|
||||
<button class="btn btn-primary" id="contract-extension-button" type="button" onclick="contractExtensionConfirmation();">Extend Hosting Contract</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="resetContractDetailTableRows();">Close</button>
|
||||
<button class="btn btn-primary" id="contract-extension-button" type="button">Extend Hosting Contract</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" id="reset-table-button">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -679,32 +700,16 @@
|
||||
</section>
|
||||
|
||||
<script>
|
||||
|
||||
if (typeof module === 'object') {
|
||||
window.module = module;
|
||||
module = undefined;
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>
|
||||
<!-- Jquery Core Js -->
|
||||
<!-- Bootstrap Core Js -->
|
||||
<!-- Select Plugin Js -->
|
||||
<script src="assets/dashboard/plugins/bootstrap-select/js/bootstrap-select.js"></script>
|
||||
<!-- Slimscroll Plugin Js -->
|
||||
<script src="assets/dashboard/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
|
||||
<!-- Waves Effect Plugin Js -->
|
||||
<script src="assets/dashboard/plugins/node-waves/waves.js"></script>
|
||||
<!-- Jquery CountTo Plugin Js -->
|
||||
<script src="assets/dashboard/plugins/jquery-countto/jquery.countTo.js"></script>
|
||||
<!-- Custom Js -->
|
||||
<script src="assets/dashboard/js/admin.js"></script>
|
||||
<script src="assets/dashboard/js/app.js"></script>
|
||||
<script src="assets/dashboard/js/bundle.js"></script>
|
||||
<!-- Demo Js -->
|
||||
<script src="assets/dashboard/js/demo.js"></script>
|
||||
<script src="assets/dashboard/js/medium.js"></script>
|
||||
<script type="text/javascript">
|
||||
checkLogin();
|
||||
</script>
|
||||
<script>
|
||||
MediumWidget.Init({
|
||||
renderTo: '#medium-widget',
|
||||
@@ -723,4 +728,4 @@
|
||||
module = window.module;
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,6 +51,12 @@
|
||||
<script src="./assets/scripts/all.min.js"></script>
|
||||
<script src="./assets/scripts/Chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
|
||||
<!-- ethoFS Js -->
|
||||
<!--<script src="assets/dashboard/plugins/bootstrap-select/js/bootstrap-select.js"></script>-->
|
||||
<script src="assets/dashboard/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
|
||||
<script src="assets/dashboard/plugins/node-waves/waves.js"></script>
|
||||
<script src="assets/dashboard/plugins/jquery-countto/jquery.countTo.js"></script>
|
||||
|
||||
|
||||
<!-- Insert this line after script imports -->
|
||||
<script>
|
||||
|
||||
1
main.js
1
main.js
@@ -8,7 +8,6 @@ const {
|
||||
const singleInstance = require("single-instance");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
var locker = new singleInstance("Ether1DesktopWallet");
|
||||
|
||||
locker.lock().then(function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// In renderer process (web page).
|
||||
const {ipcRenderer} = require("electron");
|
||||
|
||||
var web3;
|
||||
// Set the provider you want from Web3.providers
|
||||
SyncProgress = new ProgressBar.Line("#syncProgress", {
|
||||
strokeWidth: 6,
|
||||
@@ -120,7 +120,7 @@ function StartSyncProcess() {
|
||||
var InitWeb3 = setInterval(function () {
|
||||
try {
|
||||
web3Local = new Web3(new Web3.providers.WebsocketProvider("ws://localhost:8546"));
|
||||
|
||||
|
||||
web3Local.eth.net.isListening(function (error, success) {
|
||||
if (!error) {
|
||||
$(document).trigger("onGethReady");
|
||||
|
||||
1470
renderer/uploads.js
1470
renderer/uploads.js
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user