1
0
This commit is contained in:
Scott E. Graves
2017-05-05 09:35:52 -05:00
parent cfb393cb91
commit c5eaa64c13
2 changed files with 42 additions and 8 deletions

View File

@@ -199,13 +199,23 @@
<div class="hidden-element" id="upload_progress_window" style="height: inherit;"> <div class="hidden-element" id="upload_progress_window" style="height: inherit;">
<div style="display: flex; flex-direction: column; height: inherit;"> <div style="display: flex; flex-direction: column; height: inherit;">
<div class="box" style="flex-grow: 1; display: flex; flex-direction: column;"> <div class="box" style="flex-grow: 1; display: flex; flex-direction: column;">
<h1 style="flex-grow: 0;">Upload Progress <a href="javascript:void(0)" id="ID_RenterUploadsOk">back</a></h1> <h1 style="flex-grow: 0;">Upload Progress <a href="javascript:void(0)" id="ID_RenterUploadsOk">back</a></h1>
<div style="padding: 0; margin: 0; flex-grow: 1; display: flex; overflow-x: hidden; overflow-y: scroll;"> <div style="padding: 0; margin: 0; flex-grow: 1; display: flex; overflow-x: hidden; overflow-y: scroll;">
<table style="flex-grow: 1;white-space: nowrap;" id="ID_UploadProgressTable"></table> <table style="flex-grow: 1;white-space: nowrap;" id="ID_UploadProgressTable"></table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="hidden-element" id="send_window">
<div class="box">
<h1>Send to Address</h1>
<input type="text" id="ID_Send_Address" style="width: 100%;"><br><br>
<h1>Send Amount <a href="javascript:void(0)" id="ID_SendMaxAmount">max</a></h1>
<input type="number" id="ID_Send_Amount"><br><br>
<button id="ID_SendOK" type="button">Send</button>
<button id="ID_SendCancel" type="button">Cancel</button>
</div>
</div>
<div id="shutdown_window" class="hidden-element" style="padding: 0; margin: 0;position: fixed; height: 100%; width: 100%;background-image: url(./images/shutdown.gif); background-size: 100% 100%; background-repeat: no-repeat; z-index: 99999"></div> <div id="shutdown_window" class="hidden-element" style="padding: 0; margin: 0;position: fixed; height: 100%; width: 100%;background-image: url(./images/shutdown.gif); background-size: 100% 100%; background-repeat: no-repeat; z-index: 99999"></div>
</body> </body>
</html> </html>

View File

@@ -330,17 +330,16 @@
} }
function handleRenterUploads() { function handleRenterUploads() {
setMainWindow('upload_progress_window');
const okButton = document.getElementById('ID_RenterUploadsOk'); const okButton = document.getElementById('ID_RenterUploadsOk');
okButton.onclick = () => { okButton.onclick = () => {
okButton.onclick = null; okButton.onclick = null;
beginMainApplication(false); beginMainApplication(false);
}; };
setMainWindow('upload_progress_window');
} }
function handleSiaEditSettings() { function handleSiaEditSettings() {
setMainWindow('sia_settings_window');
const cancelButton = document.getElementById('ID_SiaSettingsCancel'); const cancelButton = document.getElementById('ID_SiaSettingsCancel');
cancelButton.onclick = () => { cancelButton.onclick = () => {
cancelButton.onclick = null; cancelButton.onclick = null;
@@ -372,15 +371,39 @@
} }
}); });
}; };
setMainWindow('sia_settings_window');
}
function handleWalletSend() {
const saveButton = document.getElementById('ID_SendOK');
const cancelButton = document.getElementById('ID_SendCancel');
cancelButton.onclick = () => {
cancelButton.onclick = null;
saveButton.onclick = null;
beginMainApplication(false);
};
saveButton.onclick = () => {
cancelButton.onclick = null;
saveButton.onclick = null;
beginMainApplication(false);
};
setMainWindow('send_window');
} }
function beginMainApplication(checkAutoMount) { function beginMainApplication(checkAutoMount) {
setMainWindow('app_window');
const settingsEditLink = document.getElementById('ID_Sia_Settings_Edit'); const settingsEditLink = document.getElementById('ID_Sia_Settings_Edit');
settingsEditLink.onclick = () => { settingsEditLink.onclick = () => {
settingsEditLink.onclick = null; settingsEditLink.onclick = null;
handleSiaEditSettings(); handleSiaEditSettings();
}; };
const sendLink = document.getElementById('ID_Wallet_Send');
sendLink.onclick = () => {
sendLink.onclick = null;
handleWalletSend();
};
const renterEditLink = document.getElementById('ID_Renter_Edit'); const renterEditLink = document.getElementById('ID_Renter_Edit');
renterEditLink.onclick = () => { renterEditLink.onclick = () => {
renterEditLink.onclick = null; renterEditLink.onclick = null;
@@ -430,6 +453,7 @@
if (checkAutoMount) { if (checkAutoMount) {
AppActions.autoMountDrive( ); AppActions.autoMountDrive( );
} }
setMainWindow('app_window');
} }
function handleRenterEditSettings() { function handleRenterEditSettings() {
@@ -495,7 +519,6 @@
} }
function manualUnlockWallet() { function manualUnlockWallet() {
setMainWindow('unlock_window');
const unlockButton = document.getElementById('ID_UnlockWalletButton'); const unlockButton = document.getElementById('ID_UnlockWalletButton');
unlockButton.onclick = () => { unlockButton.onclick = () => {
unlockButton.onclick = null; unlockButton.onclick = null;
@@ -515,6 +538,7 @@
password.value = ''; password.value = '';
} }
}; };
setMainWindow('unlock_window');
} }
function handleUnlockWallet() { function handleUnlockWallet() {
@@ -536,17 +560,16 @@
} }
function handleWalletCreated(seed) { function handleWalletCreated(seed) {
setMainWindow('wallet_created_window');
document.getElementById('ID_WalletSeed').innerText = seed; document.getElementById('ID_WalletSeed').innerText = seed;
const button = document.getElementById('ID_WalletCreatedButton'); const button = document.getElementById('ID_WalletCreatedButton');
button.onclick = () => { button.onclick = () => {
button.onclick = null; button.onclick = null;
handleUnlockWallet(); handleUnlockWallet();
}; };
setMainWindow('wallet_created_window');
} }
function handleCreateWallet() { function handleCreateWallet() {
setMainWindow('create_window');
const createButton = document.getElementById('ID_CreateWalletButton'); const createButton = document.getElementById('ID_CreateWalletButton');
createButton.onclick = () => { createButton.onclick = () => {
createButton.onclick = null; createButton.onclick = null;
@@ -560,6 +583,7 @@
} }
}); });
}; };
setMainWindow('create_window');
} }
function reloadApplication(checkAutoMount) { function reloadApplication(checkAutoMount) {