36 lines
763 B
HTML
36 lines
763 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Test</title>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<div id="error"></div>
|
|
|
|
<script>
|
|
const { ipcRenderer } = require('electron')
|
|
|
|
// TODO: remove into react component
|
|
ipcRenderer.on('error', function(event, errObj){
|
|
showError(errObj)
|
|
})
|
|
|
|
// Generic show error in error div function
|
|
function showError(errObj) {
|
|
if (errObj.hasOwnProperty("error")) {
|
|
console.log(errObj.error)
|
|
document.getElementById("error").innerHTML = errObj.error
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
import './src-react/App.jsx'
|
|
</script>
|
|
</body>
|
|
</html>
|