Changes
This commit is contained in:
@@ -185,21 +185,21 @@
|
||||
<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>
|
||||
<input type="checkbox" id="ID_Settings_LockWalletOnExit"><br><br>
|
||||
<h2>Auto-start on Logon</h2>
|
||||
<input type="checkbox" id="ID_SettingsAutoStart"><br><br>
|
||||
<input type="checkbox" id="ID_Settings_AutoStartOnLogon"><br><br>
|
||||
<h2>Launch file manager on mount</h2>
|
||||
<input type="checkbox" id="ID_SettingsLaunchFileManager"><br><br>
|
||||
<input type="checkbox" id="ID_Settings_LaunchFileMgrOnMount"><br><br>
|
||||
<h2>Close to system tray</h2>
|
||||
<input type="checkbox" id="ID_SettingsCloseToTray"><br><br>
|
||||
<input type="checkbox" id="ID_Settings_CloseToTray"><br><br>
|
||||
<h2>Use Bundled siad</h2>
|
||||
<input type="checkbox" id="ID_SettingsLaunchServer"><br><br>
|
||||
<input type="checkbox" id="ID_Settings_LaunchBundledSiad"><br><br>
|
||||
<h2>API Port</h2>
|
||||
<input type="number" id="ID_SettingsApiPort"><br><br>
|
||||
<input type="number" id="ID_Settings_ApiPort"><br><br>
|
||||
<h2>Host Port</h2>
|
||||
<input type="number" id="ID_SettingsHostPort"><br><br>
|
||||
<input type="number" id="ID_Settings_HostPort"><br><br>
|
||||
<h2>RPC Port</h2>
|
||||
<input type="number" id="ID_SettingsRPCPort"><br><br>
|
||||
<input type="number" id="ID_Settings_RpcPort"><br><br>
|
||||
<button id="ID_SiaSettingsOK" type="button">Save</button>
|
||||
<button id="ID_SiaSettingsCancel" type="button">Cancel</button>
|
||||
</div>
|
||||
|
@@ -157,39 +157,20 @@
|
||||
},
|
||||
notifyDriveUnmounted: _notifyDriveUnmounted,
|
||||
reloadApplication: reloadApplication,
|
||||
setAutoStartOnLogon: (start) => {
|
||||
setSiaSettings: (settings) => {
|
||||
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);
|
||||
}
|
||||
},
|
||||
setApiPort: (port) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setValue('ID_SettingsApiPort', port);
|
||||
}
|
||||
},
|
||||
setHostPort: (port) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setValue('ID_SettingsHostPort', port);
|
||||
}
|
||||
},
|
||||
setRpcPort: (port) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setValue('ID_SettingsRPCPort', port);
|
||||
}
|
||||
},
|
||||
setLaunchFileManager: (launch) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setChecked('ID_SettingsLaunchFileManager', launch);
|
||||
}
|
||||
},
|
||||
setCloseToTray: (closeToTray) => {
|
||||
if (document.getElementById('sia_settings_window').classList.contains('hidden-element')) {
|
||||
setChecked('ID_SettingsCloseToTray', closeToTray);
|
||||
const j = JSON.parse(settings);
|
||||
for (const s in j) {
|
||||
if (j.hasOwnProperty(s)) {
|
||||
const id = 'ID_Settings_' + s;
|
||||
const input = document.getElementById(id);
|
||||
if (input.type === 'checkbox') {
|
||||
setChecked(id, j[s]);
|
||||
} else {
|
||||
setValue(id, j[s]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
displayShutdownWindow: () => {
|
||||
@@ -346,14 +327,14 @@
|
||||
saveButton.onclick = null;
|
||||
cancelButton.onclick = null;
|
||||
AppActions.setSiaSettings({
|
||||
'UnlockOnExit': getChecked('ID_SettingsLockWalletOnExit'),
|
||||
'AutoStartOnLogon': getChecked('ID_SettingsAutoStart'),
|
||||
'UseBundledSiad': getChecked('ID_SettingsLaunchServer'),
|
||||
'ApiPort': getValue('ID_SettingsApiPort'),
|
||||
'HostPort': getValue('ID_SettingsHostPort'),
|
||||
'RpcPort': getValue('ID_SettingsRPCPort'),
|
||||
'LaunchFileManager': getChecked('ID_SettingsLaunchFileManager'),
|
||||
'CloseToTray': getChecked('ID_SettingsCloseToTray')
|
||||
'LockWalletOnExit': getChecked('ID_Settings_LockWalletOnExit'),
|
||||
'AutoStartOnLogon': getChecked('ID_Settings_AutoStartOnLogon'),
|
||||
'LaunchBundledSiad': getChecked('ID_Settings_LaunchBundledSiad'),
|
||||
'ApiPort': getValue('ID_Settings_ApiPort'),
|
||||
'HostPort': getValue('ID_Settings_HostPort'),
|
||||
'RpcPort': getValue('ID_Settings_RpcPort'),
|
||||
'LaunchFileMgrOnMount': getChecked('ID_Settings_LaunchFileMgrOnMount'),
|
||||
'CloseToTray': getChecked('ID_Settings_CloseToTray')
|
||||
}, (success, reason) => {
|
||||
if (success) {
|
||||
beginMainApplication();
|
||||
|
Reference in New Issue
Block a user