pinokiod 3.8.147 → 3.8.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/bin/caddy.js +6 -5
- package/kernel/bin/conda.js +5 -1
- package/kernel/bin/index.js +244 -66
- package/kernel/bin/setup.js +130 -0
- package/kernel/environment.js +36 -1
- package/kernel/index.js +23 -13
- package/kernel/loader.js +6 -4
- package/kernel/peer.js +5 -3
- package/kernel/procs.js +2 -1
- package/kernel/prototype.js +12 -9
- package/kernel/router/common.js +50 -41
- package/kernel/router/connector.js +43 -33
- package/kernel/router/index.js +118 -88
- package/kernel/router/localhost_home_router.js +1 -0
- package/kernel/router/localhost_port_router.js +0 -1
- package/kernel/router/localhost_variable_router.js +0 -1
- package/kernel/router/peer_home_router.js +0 -1
- package/kernel/router/peer_peer_router.js +0 -2
- package/kernel/router/peer_port_router.js +0 -5
- package/kernel/router/peer_variable_router.js +0 -4
- package/kernel/util.js +2 -2
- package/package.json +1 -1
- package/server/index.js +240 -375
- package/server/public/fscreator.js +1 -1
- package/server/views/network.ejs +49 -22
- package/server/views/prototypes.ejs +1 -1
- package/server/views/setup.ejs +254 -0
- package/server/views/setup_home.ejs +181 -0
|
@@ -99,7 +99,7 @@ const FSCreator = async (config) => {
|
|
|
99
99
|
instantUpload: false,
|
|
100
100
|
server: {
|
|
101
101
|
process: {
|
|
102
|
-
url: '/pinokio/
|
|
102
|
+
url: '/pinokio/prototype', // optional if same as above
|
|
103
103
|
ondata: (formData) => {
|
|
104
104
|
// set custom input fields
|
|
105
105
|
if (config.input) {
|
package/server/views/network.ejs
CHANGED
|
@@ -136,6 +136,12 @@ body.dark .browser-options-row {
|
|
|
136
136
|
color: royalblue;
|
|
137
137
|
text-decoration: none;
|
|
138
138
|
}
|
|
139
|
+
a.ln[href^=https] {
|
|
140
|
+
color: #56ad00;
|
|
141
|
+
}
|
|
142
|
+
a.ln:hover {
|
|
143
|
+
color: red !important;
|
|
144
|
+
}
|
|
139
145
|
.line.align-top h3 {
|
|
140
146
|
/*
|
|
141
147
|
align-items: flex-start;
|
|
@@ -167,9 +173,8 @@ body.dark .browser-options-row {
|
|
|
167
173
|
font-weight: bold;
|
|
168
174
|
}
|
|
169
175
|
.header-label-sub {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
padding: 10px;
|
|
176
|
+
font-size: 16px;
|
|
177
|
+
padding: 10px 0;
|
|
173
178
|
border-bottom: 1px solid rgba(0,0,0,0.1);
|
|
174
179
|
}
|
|
175
180
|
.header-label-sub .s {
|
|
@@ -196,9 +201,11 @@ body.dark .browser-options-row {
|
|
|
196
201
|
}
|
|
197
202
|
.container-row.current {
|
|
198
203
|
}
|
|
204
|
+
/*
|
|
199
205
|
.container-row.current .header-label-sub {
|
|
200
206
|
color: royalblue;
|
|
201
207
|
}
|
|
208
|
+
*/
|
|
202
209
|
.desc {
|
|
203
210
|
/*
|
|
204
211
|
text-align:center;
|
|
@@ -207,7 +214,6 @@ body.dark .browser-options-row {
|
|
|
207
214
|
}
|
|
208
215
|
.container-row table {
|
|
209
216
|
width: 100%;
|
|
210
|
-
margin-top: 20px;
|
|
211
217
|
}
|
|
212
218
|
table a {
|
|
213
219
|
text-decoration: none;
|
|
@@ -216,19 +222,26 @@ table a {
|
|
|
216
222
|
td:first-child, th:first-child {
|
|
217
223
|
max-width: 100px;
|
|
218
224
|
}
|
|
219
|
-
.container-row th {
|
|
220
|
-
text-align: left;
|
|
225
|
+
.container-row th h2 {
|
|
221
226
|
font-size: 18px;
|
|
222
|
-
|
|
227
|
+
margin: 0;
|
|
223
228
|
text-transform: uppercase;
|
|
224
229
|
}
|
|
230
|
+
.container-row th {
|
|
231
|
+
border-bottom: 1px solid rgba(0,0,0,0.05);
|
|
232
|
+
text-align: left;
|
|
233
|
+
padding: 20px 0;
|
|
234
|
+
font-weight: normal;
|
|
235
|
+
font-size: 12px;
|
|
236
|
+
margin-bottom: 10px;
|
|
237
|
+
}
|
|
225
238
|
.container-row td.title {
|
|
226
239
|
overflow-wrap: break-word;
|
|
227
240
|
}
|
|
228
241
|
.container-row td {
|
|
229
242
|
vertical-align: top;
|
|
230
243
|
font-size: 14px;
|
|
231
|
-
padding: 2px;
|
|
244
|
+
padding: 5px 2px;
|
|
232
245
|
}
|
|
233
246
|
|
|
234
247
|
.config {
|
|
@@ -404,41 +417,46 @@ input:checked + .slider:before {
|
|
|
404
417
|
-->
|
|
405
418
|
<% if (current_host === host) { %>
|
|
406
419
|
<div class='header-label-sub'>
|
|
407
|
-
<h1><i class="fa-solid fa-podcast"></i> <%=name
|
|
408
|
-
<div class='s'><i class="fa-brands fa-<%=brands[platform]%>"></i> <%=platform%> <%=host
|
|
420
|
+
<h1><i class="fa-solid fa-podcast"></i> <%=name%> (localhost)</h1>
|
|
421
|
+
<div class='s'><i class="fa-brands fa-<%=brands[platform]%>"></i> <%=platform%> <%=host%></div>
|
|
409
422
|
</div>
|
|
410
423
|
<% } else { %>
|
|
411
424
|
<div class='header-label-sub'>
|
|
412
425
|
<h1><i class="fa-solid fa-wifi"></i> <%=name%></h1>
|
|
413
|
-
<div class='s'><i class="fa-brands fa-<%=brands[platform]%>"></i> <%=platform%> <%=host
|
|
426
|
+
<div class='s'><i class="fa-brands fa-<%=brands[platform]%>"></i> <%=platform%> <%=host%></div>
|
|
414
427
|
</div>
|
|
415
428
|
<% } %>
|
|
416
429
|
<table>
|
|
417
430
|
<tr>
|
|
418
|
-
<th>Server</th>
|
|
419
|
-
<th>
|
|
420
|
-
<th>
|
|
431
|
+
<th><h2>Server</h2><div>Running apps</div></th>
|
|
432
|
+
<th><h2>Shared</h2><div>Use on any machine on the network</div></th>
|
|
433
|
+
<th><h2>Local</h2><div>Use on <%=current_host%></div></th>
|
|
421
434
|
</tr>
|
|
422
435
|
<% processes.forEach((item) => { %>
|
|
423
436
|
<tr>
|
|
424
437
|
<td class='title'><%=item.name%></td>
|
|
425
438
|
<td>
|
|
426
|
-
<% item.
|
|
439
|
+
<% item.external_router.forEach((domain) => { %>
|
|
427
440
|
<div>
|
|
428
|
-
<a target="_blank" href="https://<%=domain%>">https://<%=domain%></a>
|
|
441
|
+
<a class='ln' target="_blank" href="https://<%=domain%>">https://<%=domain%></a>
|
|
429
442
|
</div>
|
|
430
443
|
<% }) %>
|
|
431
|
-
</td>
|
|
432
|
-
<td>
|
|
433
|
-
<div>
|
|
434
|
-
<a target="_blank" href="http://localhost:<%=item.port%>">http://localhost:<%=item.port%></a>
|
|
435
|
-
</div>
|
|
436
444
|
<% if (item.external_ip) { %>
|
|
437
445
|
<div>
|
|
438
|
-
<a target="_blank" href="http://<%=item.external_ip%>">http://<%=item.external_ip%></a>
|
|
446
|
+
<a class='ln' target="_blank" href="http://<%=item.external_ip%>">http://<%=item.external_ip%></a>
|
|
439
447
|
</div>
|
|
440
448
|
<% } %>
|
|
441
449
|
</td>
|
|
450
|
+
<td>
|
|
451
|
+
<% item.internal_router.forEach((domain) => { %>
|
|
452
|
+
<div>
|
|
453
|
+
<a class='ln' target="_blank" href="https://<%=domain%>">https://<%=domain%></a>
|
|
454
|
+
</div>
|
|
455
|
+
<% }) %>
|
|
456
|
+
<div>
|
|
457
|
+
<a class='ln' target="_blank" href="http://localhost:<%=item.port%>">http://localhost:<%=item.port%></a>
|
|
458
|
+
</div>
|
|
459
|
+
</td>
|
|
442
460
|
</tr>
|
|
443
461
|
<% }) %>
|
|
444
462
|
</table>
|
|
@@ -696,6 +714,15 @@ if (document.querySelector("#wifi")) {
|
|
|
696
714
|
})
|
|
697
715
|
}
|
|
698
716
|
<% } %>
|
|
717
|
+
setInterval(() => {
|
|
718
|
+
fetch("/peer_check").then((res) => {
|
|
719
|
+
return res.json()
|
|
720
|
+
}).then((res) => {
|
|
721
|
+
if (res.updated) {
|
|
722
|
+
location.href = location.href
|
|
723
|
+
}
|
|
724
|
+
})
|
|
725
|
+
}, 2000)
|
|
699
726
|
</script>
|
|
700
727
|
</body>
|
|
701
728
|
</html>
|
|
@@ -415,7 +415,7 @@ document.querySelector(".folder-templates").addEventListener("click", async (e)
|
|
|
415
415
|
target = e.target.closest(".folder")
|
|
416
416
|
}
|
|
417
417
|
let id = target.getAttribute("data-id")
|
|
418
|
-
let res = await fetch("/pinokio/
|
|
418
|
+
let res = await fetch("/pinokio/prototype/" + id).then((res) => {
|
|
419
419
|
return res.json()
|
|
420
420
|
})
|
|
421
421
|
console.log(res)
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="UTF-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<link href="/xterm.min.css" rel="stylesheet" />
|
|
6
|
+
<link href="/css/fontawesome.min.css" rel="stylesheet">
|
|
7
|
+
<link href="/css/solid.min.css" rel="stylesheet">
|
|
8
|
+
<link href="/css/regular.min.css" rel="stylesheet">
|
|
9
|
+
<link href="/css/brands.min.css" rel="stylesheet">
|
|
10
|
+
<link href="/markdown.css" rel="stylesheet"/>
|
|
11
|
+
<link href="/noty.css" rel="stylesheet"/>
|
|
12
|
+
<link href="/style.css" rel="stylesheet"/>
|
|
13
|
+
<% if (agent === "electron") { %>
|
|
14
|
+
<link href="/electron.css" rel="stylesheet"/>
|
|
15
|
+
<% } %>
|
|
16
|
+
<style>
|
|
17
|
+
html {
|
|
18
|
+
scroll-behavior: smooth;
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
body.frozen {
|
|
23
|
+
overflow: auto !important;
|
|
24
|
+
}
|
|
25
|
+
#del-bin {
|
|
26
|
+
color: royalblue;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
body {
|
|
30
|
+
height: 100%;
|
|
31
|
+
overflow: auto;
|
|
32
|
+
/*
|
|
33
|
+
background: rgb(44, 29, 22);
|
|
34
|
+
*/
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
}
|
|
38
|
+
body {
|
|
39
|
+
/*
|
|
40
|
+
background: white;
|
|
41
|
+
background: rgb(44, 29, 22);
|
|
42
|
+
background: var(--dark-bg);
|
|
43
|
+
*/
|
|
44
|
+
}
|
|
45
|
+
.line2 {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
background: rgba(0,0,100,0.04);
|
|
50
|
+
}
|
|
51
|
+
.line2 a {
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
color: black;
|
|
54
|
+
}
|
|
55
|
+
.status {
|
|
56
|
+
padding: 10px;
|
|
57
|
+
margin: 10px;
|
|
58
|
+
border-radius: 10px;
|
|
59
|
+
}
|
|
60
|
+
.status.offline {
|
|
61
|
+
background: silver;
|
|
62
|
+
}
|
|
63
|
+
.status.online {
|
|
64
|
+
background: yellowgreen;
|
|
65
|
+
}
|
|
66
|
+
.switch {
|
|
67
|
+
padding: 10px;
|
|
68
|
+
margin: 10px 0;
|
|
69
|
+
}
|
|
70
|
+
.switch[data-online=true] {
|
|
71
|
+
color: yellowgreen;
|
|
72
|
+
}
|
|
73
|
+
.button {
|
|
74
|
+
padding: 10px;
|
|
75
|
+
}
|
|
76
|
+
.on, .off {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
.btn {
|
|
81
|
+
font-weight: normal;
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
.item {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: flex-start;
|
|
87
|
+
margin: 10px;
|
|
88
|
+
background: rgba(0,0,0,0.04);
|
|
89
|
+
}
|
|
90
|
+
.item img {
|
|
91
|
+
width: 100px;
|
|
92
|
+
}
|
|
93
|
+
.item .title {
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
color: royalblue;
|
|
96
|
+
}
|
|
97
|
+
.item .col {
|
|
98
|
+
padding: 10px;
|
|
99
|
+
}
|
|
100
|
+
.item .col > * {
|
|
101
|
+
margin: 5px 0;
|
|
102
|
+
}
|
|
103
|
+
.item .stat {
|
|
104
|
+
color: rgba(0,0,0,0.8);
|
|
105
|
+
display: flex;
|
|
106
|
+
}
|
|
107
|
+
.item .stat > * {
|
|
108
|
+
margin-right: 15px;
|
|
109
|
+
}
|
|
110
|
+
.timestamp {
|
|
111
|
+
color: rgba(0,0,0,0.5);
|
|
112
|
+
}
|
|
113
|
+
</style>
|
|
114
|
+
<script src="/hotkeys.min.js"></script>
|
|
115
|
+
<script src="/sweetalert2.js"></script>
|
|
116
|
+
<script src="/noty.js"></script>
|
|
117
|
+
<script src="/notyq.js"></script>
|
|
118
|
+
<script src="/xterm.js"></script>
|
|
119
|
+
<script src="/xterm-addon-fit.js"></script>
|
|
120
|
+
<script src="/xterm-addon-web-links.js"></script>
|
|
121
|
+
<script src="/xterm-theme.js"></script>
|
|
122
|
+
<script src="/sweetalert2.js"></script>
|
|
123
|
+
<script src="/Socket.js"></script>
|
|
124
|
+
<script src="/install.js"></script>
|
|
125
|
+
<script src="/timeago.min.js"></script>
|
|
126
|
+
<script src="/common.js"></script>
|
|
127
|
+
<script src="/report.js"></script>
|
|
128
|
+
</head>
|
|
129
|
+
<body class='<%=theme%>'>
|
|
130
|
+
<header class='grabbable'>
|
|
131
|
+
<h1>
|
|
132
|
+
<a class='path' href="/"><%-logo%></a>
|
|
133
|
+
<div class='flexible'></div>
|
|
134
|
+
<div class='nav-btns'>
|
|
135
|
+
<button class='btn2' id='report'><div><i class="fa-solid fa-bug"></i></div><div>Report Bug</div></button>
|
|
136
|
+
<a class='btn2' href='https://discord.gg/TQdNwadtE4' target="_blank"><div><i class="fa-brands fa-discord"></i></div><div>Discord</div></a>
|
|
137
|
+
<a class='btn2' href='https://twitter.com/cocktailpeanut' target="_blank"><div><i class="fa-brands fa-twitter"></i></div><div>Twitter</div></a>
|
|
138
|
+
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
139
|
+
<button id='new-window' title='open a new window' class='btn2'><i class="fa-solid fa-plus"></i></button>
|
|
140
|
+
</div>
|
|
141
|
+
</h1>
|
|
142
|
+
</h1>
|
|
143
|
+
</header>
|
|
144
|
+
<% if (requirements_pending) { %>
|
|
145
|
+
<div class='requirements'>
|
|
146
|
+
<div class='content'>
|
|
147
|
+
<div class='loading'>
|
|
148
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<% } else { %>
|
|
153
|
+
<% if (true || install_required) { %>
|
|
154
|
+
<div class='requirements'>
|
|
155
|
+
<div class='content'>
|
|
156
|
+
<% if (install_required) { %>
|
|
157
|
+
<div class='title'><i class="fa-solid fa-circle-exclamation"></i> Installation required</div>
|
|
158
|
+
<% } else { %>
|
|
159
|
+
<div class='title'><i class="fa-solid fa-circle-exclamation"></i> Installation complete</div>
|
|
160
|
+
<% } %>
|
|
161
|
+
<div class='btn-group'>
|
|
162
|
+
<% requirements.map((r) => { %>
|
|
163
|
+
<div class='requirement-item'>
|
|
164
|
+
<% if (r.installed) { %>
|
|
165
|
+
<div class='name'><%=r.name%></div>
|
|
166
|
+
<div class='flexible'></div>
|
|
167
|
+
<div class='label'>Installed</div>
|
|
168
|
+
<% } else { %>
|
|
169
|
+
<div class='name highlighted'><%=r.name%></div>
|
|
170
|
+
<div class='flexible'></div>
|
|
171
|
+
<div class='label highlighted'>Not Installed</div>
|
|
172
|
+
<% } %>
|
|
173
|
+
</div>
|
|
174
|
+
<% }) %>
|
|
175
|
+
</div>
|
|
176
|
+
<% if (!install_required) { %>
|
|
177
|
+
<a class='btn' href="/">Return home</a>
|
|
178
|
+
<% } %>
|
|
179
|
+
<form class="<%= install_required ? '' : 'hidden'%>" id='install-form' method="post" action="/pinokio/install">
|
|
180
|
+
<input type='hidden' name="requirements" value="<%=JSON.stringify(requirements)%>">
|
|
181
|
+
<input type='hidden' name='callback' value="<%=current%>">
|
|
182
|
+
<button class='btn'>Install</button>
|
|
183
|
+
</form>
|
|
184
|
+
<div class='item'>
|
|
185
|
+
<div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
|
|
186
|
+
<div class='reset-bin-loading hidden'>
|
|
187
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
<% } else { %>
|
|
193
|
+
<main>
|
|
194
|
+
<div id='terminal'>all installed</div>
|
|
195
|
+
<a href="/" class='btn'>Home</a>
|
|
196
|
+
</main>
|
|
197
|
+
<% } %>
|
|
198
|
+
<% } %>
|
|
199
|
+
<script>
|
|
200
|
+
document.addEventListener("DOMContentLoaded", async () => {
|
|
201
|
+
Reporter()
|
|
202
|
+
<% if (error) { %>
|
|
203
|
+
document.querySelector(".requirements .content").innerHTML = '<div class="loading"><i class="fa-solid fa-circle-exclamation"></i> <%=error%></div>'
|
|
204
|
+
<% } %>
|
|
205
|
+
<% if (requirements_pending) { %>
|
|
206
|
+
await new Promise((resolve, reject) => {
|
|
207
|
+
let interval = setInterval(() => {
|
|
208
|
+
fetch("/pinokio/requirements_ready").then((res) => {
|
|
209
|
+
return res.json()
|
|
210
|
+
}).then((res) => {
|
|
211
|
+
console.log(res)
|
|
212
|
+
if (res.error) {
|
|
213
|
+
alert(res.error)
|
|
214
|
+
clearInterval(interval)
|
|
215
|
+
} else if (!res.requirements_pending) {
|
|
216
|
+
clearInterval(interval)
|
|
217
|
+
resolve()
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
}, 500)
|
|
221
|
+
})
|
|
222
|
+
location.href = location.href
|
|
223
|
+
<% } %>
|
|
224
|
+
if (document.querySelector("#del-bin")) {
|
|
225
|
+
document.querySelector("#del-bin").addEventListener("click", async (e) => {
|
|
226
|
+
console.log("del-bin")
|
|
227
|
+
let proceed = confirm("Are you sure you wish to delete the bin folder?")
|
|
228
|
+
if (proceed) {
|
|
229
|
+
document.querySelector(".reset-bin-loading").classList.remove("hidden")
|
|
230
|
+
document.querySelector("#del-bin").classList.add("hidden")
|
|
231
|
+
let res = await fetch("/pinokio/delete", {
|
|
232
|
+
method: "post",
|
|
233
|
+
headers: {
|
|
234
|
+
"Content-Type": "application/json"
|
|
235
|
+
},
|
|
236
|
+
body: JSON.stringify({ type: "bin" })
|
|
237
|
+
}).then((res) => {
|
|
238
|
+
return res.json()
|
|
239
|
+
})
|
|
240
|
+
console.log(res)
|
|
241
|
+
document.querySelector(".reset-bin-loading").classList.add("hidden")
|
|
242
|
+
if (res.error) {
|
|
243
|
+
alert(res.error)
|
|
244
|
+
} else {
|
|
245
|
+
//location.href = location.href
|
|
246
|
+
document.querySelector("#install-form").submit()
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
})
|
|
252
|
+
</script>
|
|
253
|
+
</body>
|
|
254
|
+
</html>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="UTF-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<link href="/xterm.min.css" rel="stylesheet" />
|
|
6
|
+
<link href="/css/fontawesome.min.css" rel="stylesheet">
|
|
7
|
+
<link href="/css/solid.min.css" rel="stylesheet">
|
|
8
|
+
<link href="/css/regular.min.css" rel="stylesheet">
|
|
9
|
+
<link href="/css/brands.min.css" rel="stylesheet">
|
|
10
|
+
<link href="/markdown.css" rel="stylesheet"/>
|
|
11
|
+
<link href="/noty.css" rel="stylesheet"/>
|
|
12
|
+
<link href="/style.css" rel="stylesheet"/>
|
|
13
|
+
<% if (agent === "electron") { %>
|
|
14
|
+
<link href="/electron.css" rel="stylesheet"/>
|
|
15
|
+
<% } %>
|
|
16
|
+
<style>
|
|
17
|
+
html {
|
|
18
|
+
scroll-behavior: smooth;
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
body {
|
|
23
|
+
height: 100%;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
.line2 {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background: rgba(0,0,100,0.04);
|
|
33
|
+
}
|
|
34
|
+
.line2 a {
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
color: black;
|
|
37
|
+
}
|
|
38
|
+
.status {
|
|
39
|
+
padding: 10px;
|
|
40
|
+
margin: 10px;
|
|
41
|
+
border-radius: 10px;
|
|
42
|
+
}
|
|
43
|
+
.status.offline {
|
|
44
|
+
background: silver;
|
|
45
|
+
}
|
|
46
|
+
.status.online {
|
|
47
|
+
background: yellowgreen;
|
|
48
|
+
}
|
|
49
|
+
.switch {
|
|
50
|
+
padding: 10px;
|
|
51
|
+
margin: 10px 0;
|
|
52
|
+
}
|
|
53
|
+
.switch[data-online=true] {
|
|
54
|
+
color: yellowgreen;
|
|
55
|
+
}
|
|
56
|
+
.button {
|
|
57
|
+
padding: 10px;
|
|
58
|
+
}
|
|
59
|
+
.on, .off {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
}
|
|
63
|
+
.btn {
|
|
64
|
+
margin: 5px;
|
|
65
|
+
width: 100px;
|
|
66
|
+
text-align: center;
|
|
67
|
+
padding: 10px;
|
|
68
|
+
background: black;
|
|
69
|
+
color: white;
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
font-weight: normal;
|
|
72
|
+
}
|
|
73
|
+
.item {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: flex-start;
|
|
76
|
+
margin: 10px;
|
|
77
|
+
background: rgba(0,0,0,0.04);
|
|
78
|
+
}
|
|
79
|
+
.item img {
|
|
80
|
+
width: 100px;
|
|
81
|
+
}
|
|
82
|
+
.item .title {
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
color: royalblue;
|
|
85
|
+
}
|
|
86
|
+
.item .col {
|
|
87
|
+
padding: 10px;
|
|
88
|
+
}
|
|
89
|
+
.item .col > * {
|
|
90
|
+
margin: 5px 0;
|
|
91
|
+
}
|
|
92
|
+
.item .stat {
|
|
93
|
+
color: rgba(0,0,0,0.8);
|
|
94
|
+
display: flex;
|
|
95
|
+
}
|
|
96
|
+
.item .stat > * {
|
|
97
|
+
margin-right: 15px;
|
|
98
|
+
}
|
|
99
|
+
.timestamp {
|
|
100
|
+
color: rgba(0,0,0,0.5);
|
|
101
|
+
}
|
|
102
|
+
main {
|
|
103
|
+
flex-grow: 1;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
}
|
|
107
|
+
.setup-items {
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
}
|
|
111
|
+
.head {
|
|
112
|
+
padding: 80px;
|
|
113
|
+
text-align: center;
|
|
114
|
+
}
|
|
115
|
+
.head .desc {
|
|
116
|
+
opacity: 0.7;
|
|
117
|
+
padding: 10px;
|
|
118
|
+
}
|
|
119
|
+
.head h3 {
|
|
120
|
+
font-size: 50px;
|
|
121
|
+
margin: 0;
|
|
122
|
+
}
|
|
123
|
+
body.dark .card {
|
|
124
|
+
color: white;
|
|
125
|
+
}
|
|
126
|
+
.card {
|
|
127
|
+
text-decoration: none;
|
|
128
|
+
width: 200px;
|
|
129
|
+
color: rgba(0,0,0,0.9);
|
|
130
|
+
text-align: center;
|
|
131
|
+
height: 400px;
|
|
132
|
+
margin: 20px;
|
|
133
|
+
}
|
|
134
|
+
.card:hover {
|
|
135
|
+
color: royalblue !important;
|
|
136
|
+
}
|
|
137
|
+
.card .desc {
|
|
138
|
+
text-align: left;
|
|
139
|
+
opacity: 0.7;
|
|
140
|
+
}
|
|
141
|
+
.card h3 {
|
|
142
|
+
font-size: 30px;
|
|
143
|
+
letter-spacing: -1px;
|
|
144
|
+
}
|
|
145
|
+
.card i {
|
|
146
|
+
font-size: 50px;
|
|
147
|
+
}
|
|
148
|
+
</style>
|
|
149
|
+
</head>
|
|
150
|
+
<body class='<%=theme%>'>
|
|
151
|
+
<header class='grabbable'>
|
|
152
|
+
<h1>
|
|
153
|
+
<a class='path' href="/"><%-logo%></a>
|
|
154
|
+
<div class='flexible'></div>
|
|
155
|
+
<div class='nav-btns'>
|
|
156
|
+
<button class='btn2' id='report'><div><i class="fa-solid fa-bug"></i></div><div>Report Bug</div></button>
|
|
157
|
+
<a class='btn2' href='https://discord.gg/TQdNwadtE4' target="_blank"><div><i class="fa-brands fa-discord"></i></div><div>Discord</div></a>
|
|
158
|
+
<a class='btn2' href='https://twitter.com/cocktailpeanut' target="_blank"><div><i class="fa-brands fa-twitter"></i></div><div>Twitter</div></a>
|
|
159
|
+
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
160
|
+
<button id='new-window' title='open a new window' class='btn2'><i class="fa-solid fa-plus"></i></button>
|
|
161
|
+
</div>
|
|
162
|
+
</h1>
|
|
163
|
+
</h1>
|
|
164
|
+
</header>
|
|
165
|
+
<main>
|
|
166
|
+
<div class='head'>
|
|
167
|
+
<h3>Setup</h3>
|
|
168
|
+
<div class='desc'>Select a setup option (You can set up multiple options).</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class='setup-items'>
|
|
171
|
+
<% items.forEach((item) => { %>
|
|
172
|
+
<a class='card' href="/setup/<%=item.id%>">
|
|
173
|
+
<i class="<%=item.icon%>"></i>
|
|
174
|
+
<h3><%=item.title%></h3>
|
|
175
|
+
<div class='desc'><%=item.description%></div>
|
|
176
|
+
</a>
|
|
177
|
+
<% }) %>
|
|
178
|
+
</div>
|
|
179
|
+
</main>
|
|
180
|
+
</body>
|
|
181
|
+
</html>
|