Settings
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<div class="padded" id="main_window" style="padding-top: 0;"></div>
|
||||
<div class="hidden-element" id="app_window">
|
||||
<div class="box" id="general_info">
|
||||
<h1>Sia Information</h1>
|
||||
<h1>Sia Information <a href="javascript:void(0)" id="ID_Sia_Settings_Edit">settings</a></h1>
|
||||
<div style="float: right;">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -173,6 +173,20 @@
|
||||
<button id="ID_RenterSettingsCancel" type="button">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden-element" id="sia_settings_window">
|
||||
<div class="box" id="sia_settings">
|
||||
<h1>Sia Settings</h1>
|
||||
<h2>Lock Wallet on Application Exit</h2>
|
||||
<input type="checkbox" id="ID_SettingsLockWalletOnExit"><br><br>
|
||||
<h2>Auto-start on Logon</h2>
|
||||
<input type="checkbox" id="ID_SettingsAutoStart"><br><br>
|
||||
<h2>Use Bundled siad</h2>
|
||||
<input type="checkbox" id="ID_SettingsLaunchServer"><br><br>
|
||||
<button id="ID_SiaSettingsDefaults" type="button">Defaults</button>
|
||||
<button id="ID_SiaSettingsOK" type="button">Save</button>
|
||||
<button id="ID_SiaSettingsCancel" type="button">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden-element" id="upload_progress_window">
|
||||
<div class="box">
|
||||
<h1>Upload Progress</h1>
|
||||
|
@@ -8,6 +8,10 @@
|
||||
document.getElementById(id).value = value;
|
||||
}
|
||||
|
||||
function setChecked(id, value) {
|
||||
document.getElementById(id)["checked"] = value;
|
||||
}
|
||||
|
||||
function getValue(id) {
|
||||
return document.getElementById(id).value;
|
||||
}
|
||||
@@ -117,6 +121,11 @@
|
||||
},
|
||||
setReceiveAddress: (address) => {
|
||||
setInnerText('ID_WalletReceiveAddress', address);
|
||||
},
|
||||
setLockWalletOnExit: (lock) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setChecked('ID_SettingsLockWalletOnExit', lock);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -134,7 +143,17 @@
|
||||
setSelect('ID_MountDrives', drives);
|
||||
},
|
||||
notifyDriveUnmounted: _notifyDriveUnmounted,
|
||||
reloadApplication: reloadApplication
|
||||
reloadApplication: reloadApplication,
|
||||
setAutoStartOnLogon: (start) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setChecked('ID_SettingsAutoStart', start);
|
||||
}
|
||||
},
|
||||
setLaunchBundledSiad: (launch) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setChecked('ID_SettingsLaunchServer', launch);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -274,9 +293,23 @@
|
||||
};
|
||||
}
|
||||
|
||||
function handleSiaEditSettings() {
|
||||
setMainWindow('sia_settings_window');
|
||||
const cancelButton = document.getElementById('ID_SiaSettingsCancel');
|
||||
cancelButton.onclick = () => {
|
||||
cancelButton.onclick = null;
|
||||
beginMainApplication();
|
||||
};
|
||||
}
|
||||
|
||||
function beginMainApplication() {
|
||||
AppActions.startApp();
|
||||
setMainWindow('app_window');
|
||||
const settingsEditLink = document.getElementById('ID_Sia_Settings_Edit');
|
||||
settingsEditLink.onclick = () => {
|
||||
settingsEditLink.onclick = null;
|
||||
handleSiaEditSettings();
|
||||
};
|
||||
const renterEditLink = document.getElementById('ID_Renter_Edit');
|
||||
renterEditLink.onclick = () => {
|
||||
renterEditLink.onclick = null;
|
||||
|
Reference in New Issue
Block a user