Icon and prebuilt query fixes
parent
90c1a6f9c9
commit
9b04873271
14
main.js
14
main.js
|
@ -1,6 +1,8 @@
|
|||
const electron = require('electron')
|
||||
var platform = require('os').platform()
|
||||
// Module to control application life.
|
||||
const app = electron.app
|
||||
const Tray = electron.Tray
|
||||
// Module to create native browser window.
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
|
||||
|
@ -10,13 +12,21 @@ let mainWindow
|
|||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({width: 1280, height: 800, icon:__dirname + '/src/img/favicon.ico'})
|
||||
mainWindow = new BrowserWindow({width: 1280, height: 800, icon: __dirname + '/src/img/icon.ico'})
|
||||
var trayIcon;
|
||||
|
||||
if (platform == 'darwin'){
|
||||
trayIcon = __dirname + '/src/img/icon.png'
|
||||
}else{
|
||||
trayIcon = __dirname + '/src/img/icon.ico'
|
||||
}
|
||||
|
||||
appIcon = new Tray(trayIcon)
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadURL(`file://${__dirname}/index.html`)
|
||||
|
||||
// Open the DevTools.
|
||||
//mainWindow.webContents.openDevTools()
|
||||
mainWindow.webContents.openDevTools()
|
||||
|
||||
// Emitted when the window is closed.
|
||||
mainWindow.on('closed', function () {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"start": "set ENV=development & electron .",
|
||||
"dev": "concurrently -k \"babel-node server.js\" \"npm start\"",
|
||||
"build": "webpack --config webpack.config.production.js && electron-packager . Bloodhound --platform=all --arch=all --overwrite --prune",
|
||||
"winbuild": "webpack --config webpack.config.production.js && electron-packager . Bloodhound --platform=win32 --arch=all --overwrite --prune"
|
||||
"winbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=win32 --arch=x64 --overwrite --prune"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
|
|
|
@ -12,16 +12,20 @@ export default class PrebuiltQueriesDisplay extends Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
fs.readFile('src/components/SearchContainer/Tabs/PrebuiltQueries.json', 'utf8', function(err, data){
|
||||
var x = JSON.parse(data)
|
||||
var y = []
|
||||
$.ajax({
|
||||
url: 'src/components/SearchContainer/Tabs/prebuiltqueries.json',
|
||||
type: 'GET',
|
||||
success: function(response){
|
||||
var x = JSON.parse(response)
|
||||
var y = []
|
||||
|
||||
$.each(x.queries, function(index, el) {
|
||||
y.push(el)
|
||||
});
|
||||
$.each(x.queries, function(index, el) {
|
||||
y.push(el)
|
||||
});
|
||||
|
||||
this.setState({queries: y})
|
||||
}.bind(this))
|
||||
this.setState({queries: y})
|
||||
}.bind(this)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 361 KiB |
Binary file not shown.
After Width: | Height: | Size: 661 B |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -25,7 +25,10 @@ var config = {
|
|||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
]
|
||||
],
|
||||
node: {
|
||||
__dirname: true
|
||||
}
|
||||
};
|
||||
|
||||
config.target = webpackTargetElectronRenderer(config);
|
||||
|
|
Loading…
Reference in New Issue