gars_v2
Version:
Geo Assistant Research System
24 lines (19 loc) • 802 B
JavaScript
// Here is the starting point for your application code.
// All stuff below is just to show you how it works. You can delete all of it.
// Use new ES6 modules syntax for everything.
import { remote, ipcRenderer } from 'electron'; // native electron module
import env from './env';
import url from 'url';
import path from 'path';
import Finder from './finder/index';
console.log('Loaded environment variables:', env);
var finder = new Finder($('body'));
var state = remote.getGlobal('state');
finder.navigate(state.get('path'));
finder.onopen = function({ name, path, type }) {
if (type === 'image') {
console.log('sending preview request', path);
ipcRenderer.send('preview', path);
}
};
ipcRenderer.on('navigate', (e, file) => finder.navigate(file));