Mo stuffs
This commit is contained in:
@@ -114,6 +114,11 @@
|
||||
console.log('Create wallet');
|
||||
return window.appActions.createWallet(cb);
|
||||
}
|
||||
|
||||
function _mountDrive(mountLocation, cb) {
|
||||
console.log('Mount drive: ' + mountLocation);
|
||||
return window.appActions.mountDrive(mountLocation, cb);
|
||||
}
|
||||
|
||||
function _startApp() {
|
||||
window.appActions.startApp();
|
||||
@@ -124,15 +129,21 @@
|
||||
}
|
||||
|
||||
function _unlockWallet(pwd, cb) {
|
||||
console.log('Unlock wallet');
|
||||
return window.appActions.unlockWallet(pwd, cb);
|
||||
}
|
||||
|
||||
function _unmountDrive(cb) {
|
||||
console.log('Unmount drive');
|
||||
return window.appActions.unmountDrive(cb);
|
||||
}
|
||||
|
||||
return {
|
||||
createWallet: _createWallet,
|
||||
mountDrive: _mountDrive,
|
||||
startApp: _startApp,
|
||||
stopApp: _stopApp,
|
||||
unlockWallet: _unlockWallet
|
||||
unlockWallet: _unlockWallet,
|
||||
unmountDrive: _unmountDrive
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -162,6 +173,31 @@
|
||||
function beginMainApplication() {
|
||||
AppActions.startApp();
|
||||
setMainWindow('app_window');
|
||||
const mountButton = document.getElementById('ID_MountButton');
|
||||
|
||||
const mountHandler = ()=> {
|
||||
mountButton.onclick = null;
|
||||
if (mountButton.innerText === "Mount") {
|
||||
AppActions.mountDrive(document.getElementById('ID_MountDrives').value, (success, reason) => {
|
||||
if (success) {
|
||||
mountButton.innerText = "Unmount";
|
||||
} else {
|
||||
displayErrorPopup('Mount Failed', reason);
|
||||
}
|
||||
mountButton.onclick = mountHandler;
|
||||
});
|
||||
} else {
|
||||
AppActions.unmountDrive((success, reason) => {
|
||||
if (success) {
|
||||
mountButton.innerText = "Mount";
|
||||
} else {
|
||||
displayErrorPopup('Unmount Failed', reason);
|
||||
}
|
||||
mountButton.onclick = mountHandler;
|
||||
});
|
||||
}
|
||||
};
|
||||
mountButton.onclick = mountHandler;
|
||||
}
|
||||
|
||||
function handleUnlockWallet() {
|
||||
|
Reference in New Issue
Block a user