1
0

Renter allowance changes

This commit is contained in:
Scott E. Graves
2017-03-28 18:35:39 -05:00
parent ffaf818e5f
commit 8d0b76e378
6 changed files with 107 additions and 11 deletions

View File

@@ -164,8 +164,8 @@
<input type="number" id="ID_RenterSetFunds"><br><br>
<h2>Number of Hosts</h2>
<input type="number" id="ID_RenterSetHosts"><br><br>
<h2>Contract Duration</h2>
<input type="number" id="ID_RenterSetDuration"><br><br>
<h2>Contract Period</h2>
<input type="number" id="ID_RenterSetPeriod"><br><br>
<h2>Renew Window</h2>
<input type="number" id="ID_RenterSetRenewWindow"><br><br>
<button id="ID_RenterSettingsOK" type="button">Save</button>

View File

@@ -51,6 +51,12 @@
},
setUploadCost: (currency)=> {
setInnerText('ID_Renter_EstimatedUploadCost', currency);
},
setAllowance: (allowance)=> {
setInnerText('ID_RenterSetFunds', allowance.Funds);
setInnerText('ID_RenterSetHosts', allowance.Hosts);
setInnerText('ID_RenterSetPeriod', allowance.Period);
setInnerText('ID_RenterSetRenewWindow', allowance.RenewWindowInBlocks);
}
};
})();
@@ -147,7 +153,11 @@
function _shutdown() {
window.appActions.shutdown();
}
function _setRenterAllowance(allowance) {
window.appActions.setRenterAllowance(allowance);
}
return {
createWallet: _createWallet,
mountDrive: _mountDrive,
@@ -155,7 +165,8 @@
stopApp: _stopApp,
unlockWallet: _unlockWallet,
unmountDrive: _unmountDrive,
shutdown: _shutdown
shutdown: _shutdown,
setRenterAllowance: _setRenterAllowance
};
})();
@@ -236,6 +247,7 @@
}
function handleRenterEditSettings() {
setMainWindow('renter_settings_window');
const cancelButton = document.getElementById('ID_RenterSettingsCancel');
cancelButton.onclick = ()=> {