-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.html
88 lines (80 loc) · 2.81 KB
/
settings.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link href='style.css' rel='stylesheet' />
<title>Settings</title>
<script src="https://unpkg.com/hotkeys-js/dist/hotkeys.min.js"></script>
<script type="text/javascript">
hotkeys('ctrl+shift+d', function (event, handler) {
event.preventDefault();
window.location.href = "devmode.html";
});
</script>
</head>
<body>
<a href="#" id="exitdev">Exit [DEV MODE]</a>
<div class="setting-menu" onclick="gnomeControlCentre()">
<img src="media/gnome-control-center.png">
<br>
<h1>Gnome Control Centre</h1>
<p>Configure the network or advanced settings like VPNs with Gnome Control Centre</p>
</div>
<div class="setting-menu" onclick="window.location = 'settings/home.html'">
<img src="media/home.png">
<br>
<h1>Home Page</h1>
<p>Edit settings pertaining to the home page</p>
</div>
<div class="setting-menu" onclick="window.location = 'settings/apps.html'">
<img src="media/apps.png">
<br>
<h1>Applications</h1>
<p>Edit, add, or delete apps!</p>
</div>
<div class="setting-menu" onclick="window.location = 'settings/misc.html'">
<img src="media/gnome-control-center.png">
<br>
<h1>Misc.</h1>
<p>Edit other settings</p>
</div>
<hr>
<div class="setting-menu" onclick="window.location = 'settings/about.html'">
<img src="media/about.png">
<br>
<h1>About</h1>
<p>About this instance of SmartDisplayPi</p>
</div>
<div class="setting-menu" onclick="window.location = 'Setup/wizardhome.html'">
<img src="media/setup.png">
<br>
<h1>Setup Wizard</h1>
<p>Launch Setup Wizard</p>
</div>
<script src="scripts/universal.js"></script>
<script>
if (settings.get("devMode", false) == true) {
document.getElementById("exitdev").style.display = "block";
document.getElementById("exitdev").onclick = () => {
q = confirm("Are you sure you want to exit developer mode? (You will also reboot)");
if (q) {
settings.set("devMode", false);
console.log("Rebooting");
require('reboot').rebootImmediately();
}
}
}
function gnomeControlCentre() {
if (settings.get("firstTimeOpeningExternalApp", true)) {
alert("Do not click minimize after this window is opened, it will disappear until reboot and will slow down your smartdisplay until then.");
settings.set("firstTimeOpeningExternalApp", false);
gnomeControlCentre();
return;
}
var exec = require('child_process').exec;
exec('gnome-control-center', function (error, stdout, stderr) { console.log(stdout); console.log(stderr); if (error) throw error; });
}
</script>
</body>
</html>