1
0
This commit is contained in:
Scott E. Graves
2017-05-03 21:27:30 -05:00
parent 688e2d9e56
commit 304acc81e8
230 changed files with 300 additions and 6248 deletions

View File

@@ -183,7 +183,8 @@
<input type="checkbox" id="ID_Settings_AutoStartOnLogon">&nbsp;Auto-start on logon<br><br>
<input type="checkbox" id="ID_Settings_LaunchFileMgrOnMount">&nbsp;Launch file manager on mount<br><br>
<input type="checkbox" id="ID_Settings_CloseToTray">&nbsp;Close to system tray<br><br>
<input type="checkbox" id="ID_Settings_LaunchBundledSiad">&nbsp;Use Bundled siad<br><br>
<input type="checkbox" id="ID_Settings_StoreUnlockPassword">&nbsp;Store unlock password<br><br>
<input type="checkbox" id="ID_Settings_LaunchBundledSiad">&nbsp;Use bundled siad<br><br>
<h1>API Port</h1>
<input type="number" id="ID_Settings_ApiPort"><br><br>
<h1>Host Port</h1>

View File

@@ -208,13 +208,18 @@
return window.uiState.defaultRenterSettings;
}
function _getStoreUnlockPassword() {
return window.uiState.storeUnlockPassword;
}
return {
clientVersion: _clientVersion,
isOnline: _isOnline,
isWalletConfigured: _isWalletConfigured,
isWalletLocked: _isWalletLocked,
allocatedRenterFunds: _allocatedRenterFunds,
defaultRenterSettings: _defaultRenterSettings
defaultRenterSettings: _defaultRenterSettings,
getStoreUnlockPassword: _getStoreUnlockPassword
};
})();
@@ -229,6 +234,10 @@
return window.appActions.mountDrive(mountLocation, cb);
}
function _autoUnlockWallet(cb) {
return window.appActions.autoUnlockWallet(cb);
}
function _unlockWallet(pwd, cb) {
return window.appActions.unlockWallet(pwd, cb);
}
@@ -258,6 +267,7 @@
createWallet: _createWallet,
mountDrive: _mountDrive,
unlockWallet: _unlockWallet,
autoUnlockWallet: _autoUnlockWallet,
unmountDrive: _unmountDrive,
shutdown: _shutdown,
setRenterSettings: _setRenterSettings,
@@ -334,7 +344,8 @@
'HostPort': getValue('ID_Settings_HostPort'),
'RpcPort': getValue('ID_Settings_RpcPort'),
'LaunchFileMgrOnMount': getChecked('ID_Settings_LaunchFileMgrOnMount'),
'CloseToTray': getChecked('ID_Settings_CloseToTray')
'CloseToTray': getChecked('ID_Settings_CloseToTray'),
'StoreUnlockPassword': getChecked('ID_Settings_StoreUnlockPassword')
}, (success, reason) => {
if (success) {
beginMainApplication();
@@ -453,9 +464,8 @@
};
}
function handleUnlockWallet() {
function manualUnlockWallet() {
setMainWindow('unlock_window');
const unlockButton = document.getElementById('ID_UnlockWalletButton');
unlockButton.onclick = () => {
unlockButton.onclick = null;
@@ -477,6 +487,24 @@
};
}
function handleUnlockWallet() {
if (UiState.getStoreUnlockPassword()) {
if (AppActions.autoUnlockWallet((success) => {
if (success) {
beginMainApplication();
} else {
manualUnlockWallet();
}
})) {
setMainWindow('unlocking_window');
} else {
manualUnlockWallet();
}
} else {
manualUnlockWallet();
}
}
function handleWalletCreated(seed) {
setMainWindow('wallet_created_window');
document.getElementById('ID_WalletSeed').innerText = seed;