upload
This commit is contained in:
45
FloChartPlayer/public/electron.js
Normal file
45
FloChartPlayer/public/electron.js
Normal file
@@ -0,0 +1,45 @@
|
||||
const electron = require('electron');
|
||||
|
||||
const { app } = electron;
|
||||
const { BrowserWindow } = electron;
|
||||
|
||||
const path = require('path');
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
let mainWindow;
|
||||
|
||||
function createWindow() {
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 900,
|
||||
height: 680,
|
||||
frame: false,
|
||||
titleBarStyle: 'hidden',
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
webSecurity: false,
|
||||
},
|
||||
});
|
||||
mainWindow.loadURL(
|
||||
isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`,
|
||||
);
|
||||
if (isDev) {
|
||||
// Open the DevTools.
|
||||
// BrowserWindow.addDevToolsExtension('<location to your react chrome extension>');
|
||||
mainWindow.webContents.openDevTools();
|
||||
}
|
||||
mainWindow.on('closed', () => { mainWindow = null; });
|
||||
}
|
||||
|
||||
app.on('ready', createWindow);
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
9
FloChartPlayer/public/index.html
Normal file
9
FloChartPlayer/public/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>FloChart Player</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
2
FloChartPlayer/public/robots.txt
Normal file
2
FloChartPlayer/public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Reference in New Issue
Block a user