-
Notifications
You must be signed in to change notification settings - Fork 59
/
preferences.html
102 lines (95 loc) · 3.35 KB
/
preferences.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html>
<head>
<title>Settings</title>
<meta charset="UTF-8" />
<meta content="text/html" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui" name="viewport" />
<link as="style" href="loader.css" onload="this.rel='stylesheet'" rel="preload">
<!-- loader style preload -->
<script>
window.$ = require("jquery/dist/jquery.slim.min.js");
require("popper.js");
require("bootstrap/dist/js/bootstrap.min.js");
</script>
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="res/fonts/iconfont.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- loader -->
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
</div>
<script>
window.onload = function () {
$("body").addClass("loaded");
setTimeout(function () {
$('#loader-wrapper').remove()
}, 1000);
}
</script>
<script src="supporter.js"></script>
<div id="controller">
<a class="small rest" href="javascript:window.close()">
<i class="iconfont icon-close" id="exit-and-save"></i>
</a>
<script>
$('#exit-and-save').attr('title', i18n.__('exit-and-save'));
if (process.platform === "darwin") $("#controller").css("display", "none");
</script>
</div>
<div class="d-flex h3 rest" id="settings-title">
<script>document.write(i18n.__('settings'));</script>
</div>
<div id="settings-title-hr"></div>
<div class="d-flex" id="settings-container">
</div>
<script src="preferences-renderer.js"></script>
<script src="preferences-items.js"></script>
<!-- right click context menu methods -->
<script>
$(".get-help").attr('title', i18n.__('helper'));
window.addEventListener('contextmenu', function (e) {
e.preventDefault();
ipc.send("settings-win-context-menu");
}, false);//right-click menu
let isLong = false;
let touch, x, y;
$("#settings-container").on({
touchstart: function (e) {
isLong = false;
touch = e.touches[0];
x = Number(touch.pageX);
y = Number(touch.pageY);//get axis
timeOutEvent = setTimeout(function () {
isLong = true;
ipc.send("settings-win-context-menu", { x: x, y: y });
}, 500);
},
touchmove: function () {
clearTimeout(timeOutEvent);
timeOutEvent = 0;
},
touchend: function () {
clearTimeout(timeOutEvent);
}
});//long-touch menu
</script>
<script>
if (store.get("i18n").indexOf("zh") === -1) {
$('body').append(`
<style>
#settings-container .btn {
font-size: smaller !important;
}
</style>
`);
}
</script>
<script src="updater.js"></script>
<script src="renderer.js"></script>
</body>
</html>