Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function (dispatch, getState) {
const state = getState(),
groupIndex = 0, // assume for now
group = state[tabGroupName][groupIndex],
focusedAce = _.find(group.tabs, {id: group.active}),
aceInstance = focusedAce && getAceInstance(focusedAce.id),
content = aceInstance && aceInstance.getSession().getValue();
if (_.isString(content)) {
return send('saveFile', filename, content)
.then(() => dispatch(fileIsSaved(group.groupId, focusedAce.id, filename)))
.catch(error => dispatch(errorCaught(error)));
}
};
}
function getUpdatePath() {
var path = $("#updateMultiplePath").val();
if (path === ''){
path = $("#ofPath").val();
}
ipc.send('pickUpdatePath', path); // current path could go here
}
peer.on('error', function error (err) {
ipc.send('icon', 'disconnected')
console.error('peer error')
console.error(err)
ui.containers.content.innerHTML = 'Error connecting! Please Quit. ' + err.message
})
function quit(){
ipc.send('quit', '');
}
function browseOfPath() {
peer.on('close', function close () {
ipc.send('icon', 'disconnected')
showChoose()
})
})
openDevTools() {
var ipc = require('ipc');
ipc.send('devTools', null);
}
var updateOnlineStatus = function() {
ipc.send('online-status-changed', navigator.onLine ? 'online' : 'offline');
};
function setUrl(url) {
input.value = '';
dialog.classList.add('hide');
if (url) {
ipc.send('set-url', url);
}
}
updateIconMode: function(){
var force = true;
if(this.newmail) force = false;
ipc.send("darkmode", this.darkmode, force);
this.saveConfig();
},
signOut: function() {
trigger: function (key, args, callback) {
var id = this.registerCallback(callback);
ipc.send("trigger", key, args, id, this.windowId);
},