-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpreload.html
63 lines (58 loc) · 1.22 KB
/
preload.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
53
54
55
56
57
58
59
60
61
62
63
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
<style>
* {
-webkit-user-drag: none;
user-select: none;
}
html,
body,
#app {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
.logo {
width: 256px;
height: 256px;
}
</style>
</head>
<body>
<div id="app">
<img src="./icons/win32/icon.png" class="logo" />
</div>
<script>
const baseURL =
location.search === "?env=dev" ? "http://localhost:8080" : "/dist";
nw.Window.open(
`${baseURL}/main.html`,
{
id: "iyo-image-converter",
width: 1080,
height: 720,
min_width: 780,
min_height: 580,
icon: "icons/win32/icon.png",
title: " ",
show: false,
new_instance: true,
mixed_context: true,
},
(win) => {
win.on("loaded", () => {
win.setShowInTaskbar(true);
win.show();
win.focus();
nw.Window.get().close();
});
}
);
</script>
</body>
</html>