More changes
This commit is contained in:
@@ -175,6 +175,9 @@
|
||||
window.appActions.setRenterSettings(allowance, cb);
|
||||
}
|
||||
|
||||
function _calculateEstimatedStorage(funds) {
|
||||
return window.appActions.calculateEstimatedStorage(funds)
|
||||
}
|
||||
return {
|
||||
createWallet: _createWallet,
|
||||
mountDrive: _mountDrive,
|
||||
@@ -183,7 +186,8 @@
|
||||
unlockWallet: _unlockWallet,
|
||||
unmountDrive: _unmountDrive,
|
||||
shutdown: _shutdown,
|
||||
setRenterSettings: _setRenterSettings
|
||||
setRenterSettings: _setRenterSettings,
|
||||
calculateEstimatedStorage: _calculateEstimatedStorage
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -269,8 +273,15 @@
|
||||
|
||||
function handleRenterEditSettings() {
|
||||
setMainWindow('renter_settings_window');
|
||||
const estStorage = document.getElementById('ID_RenterCalcStorage');
|
||||
const funds = document.getElementById('ID_RenterSetFunds');
|
||||
funds.oninput = () => {
|
||||
estStorage.innerText = AppActions.calculateEstimatedStorage(funds.value);
|
||||
};
|
||||
|
||||
const defaultsButton = document.getElementById('ID_RenterSettingsDefaults');
|
||||
defaultsButton.onclick = ()=> {
|
||||
funds.oninput = null;
|
||||
const settings = UiState.defaultRenterSettings();
|
||||
if (getValue('ID_RenterSetFunds') === '0') {
|
||||
setValue('ID_RenterSetFunds', settings.Funds);
|
||||
@@ -282,6 +293,7 @@
|
||||
|
||||
const cancelButton = document.getElementById('ID_RenterSettingsCancel');
|
||||
cancelButton.onclick = ()=> {
|
||||
funds.oninput = null;
|
||||
saveButton.onclick = null;
|
||||
cancelButton.onclick = null;
|
||||
defaultsButton.onclick = null;
|
||||
@@ -290,6 +302,7 @@
|
||||
|
||||
const saveButton = document.getElementById('ID_RenterSettingsOK');
|
||||
saveButton.onclick = ()=> {
|
||||
funds.oninput = null;
|
||||
saveButton.onclick = null;
|
||||
cancelButton.onclick = null;
|
||||
defaultsButton.onclick = null;
|
||||
|
Reference in New Issue
Block a user