63 lines
1.9 KiB
HTML
63 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Status</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
|
<link rel="stylesheet" href="https://unpkg.com/emoji-mart@2.8.1/css/emoji-mart.css" />
|
|
<script>
|
|
(function() {
|
|
if (!process.env.HOT) {
|
|
const link = document.createElement('link');
|
|
link.rel = 'stylesheet';
|
|
link.href = './dist/style.css';
|
|
// HACK: Writing the script path should be done with webpack
|
|
document.getElementsByTagName('head')[0].appendChild(link);
|
|
}
|
|
}());
|
|
</script>
|
|
<style>
|
|
body {
|
|
font-family: Roboto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body style="overflow:hidden; margin: 0px;">
|
|
<div id="root"></div>
|
|
<script>
|
|
{
|
|
const scripts = [];
|
|
|
|
// Dynamically insert the DLL script in development env in the
|
|
// renderer process
|
|
if (process.env.NODE_ENV === 'development') {
|
|
scripts.push('../dll/renderer.dev.dll.js');
|
|
}
|
|
|
|
// Dynamically insert the bundled app script in the renderer process
|
|
const port = process.env.PORT || 1212;
|
|
scripts.push(
|
|
(process.env.HOT)
|
|
? 'http://localhost:' + port + '/dist/renderer.dev.js'
|
|
: './dist/renderer.prod.js'
|
|
);
|
|
|
|
document.write(
|
|
scripts
|
|
.map(script => `<script defer src="${script}"><\/script>`)
|
|
.join('')
|
|
);
|
|
|
|
let shell = require('electron').shell
|
|
document.addEventListener('click', function (event) {
|
|
if (event.target.tagName === 'A' && event.target.href.startsWith('http')) {
|
|
event.preventDefault()
|
|
shell.openExternal(event.target.href)
|
|
}
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|