-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome_screen.html
52 lines (49 loc) · 1.77 KB
/
welcome_screen.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<link href="css/skeleton.css" rel="stylesheet">
<title> 3D Annotator - Welcome </title>
</head>
<body>
<div id="wrap">
<div><a href="html/newProj.html"><button id="new_proj_b"> Create new project </button></a></div>
<div><button id="ex_proj_b"> Open existing project </button></div>
<div><a href="html/help.html" target="_blank"><button id="hlp_b"> Help </button></a></div>
</div>
<style>
div#wrap {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#wrap div {
width: 90%;
margin: 0 auto;
}
#wrap div button {
width: 90%;
margin: 3 auto;
font-weight: bold;
}
</style>
</body>
<script>
const {ipcRenderer} = require('electron');
const {dialog} = require('electron').remote;
document.getElementById("ex_proj_b").addEventListener("click", function(e){
var pathProm = dialog.showOpenDialog({
properties: ['openDirectory']
});
pathProm.then(function(i) {
var path = i.filePaths[0]; // this is the actual path
console.log(path);
if (path != undefined)
ipcRenderer.send("open", path);
});
});
</script>
</html>