pinokiod 3.9.0 → 3.9.3
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/:w +1247 -0
- package/kernel/api/filepicker/index.js +59 -0
- package/kernel/api/fs/index.js +6 -4
- package/kernel/api/index.js +123 -37
- package/kernel/api/input/index.js +2 -0
- package/kernel/api/web/index.js +6 -0
- package/kernel/bin/caddy.js +127 -0
- package/kernel/bin/cloudflared.js +1 -0
- package/kernel/bin/conda.js +10 -2
- package/kernel/bin/cuda.js +0 -16
- package/kernel/bin/ffmpeg.js +4 -6
- package/kernel/bin/git.js +55 -29
- package/kernel/bin/gxx.js +8 -6
- package/kernel/bin/huggingface.js +4 -5
- package/kernel/bin/index.js +347 -88
- package/kernel/bin/node.js +13 -6
- package/kernel/bin/py.js +1 -1
- package/kernel/bin/setup.js +146 -0
- package/kernel/bin/uv.js +4 -5
- package/kernel/bin/zip.js +7 -8
- package/kernel/connect/index.js +25 -0
- package/kernel/connect/providers/github/README.md +11 -0
- package/kernel/connect/providers/x/README.md +96 -0
- package/kernel/connect/providers/x/index.js +152 -0
- package/kernel/environment.js +50 -1
- package/kernel/index.js +152 -32
- package/kernel/info.js +4 -2
- package/kernel/kv.js +38 -0
- package/kernel/loader.js +13 -3
- package/kernel/peer.js +161 -0
- package/kernel/procs.js +116 -0
- package/kernel/prototype.js +62 -0
- package/kernel/router/common.js +42 -0
- package/kernel/router/connector.js +81 -0
- package/kernel/router/index.js +235 -0
- package/kernel/router/localhost_home_router.js +84 -0
- package/kernel/router/localhost_port_router.js +15 -0
- package/kernel/router/localhost_variable_router.js +37 -0
- package/kernel/router/peer_home_router.js +15 -0
- package/kernel/router/peer_peer_router.js +26 -0
- package/kernel/router/peer_port_router.js +45 -0
- package/kernel/router/peer_variable_router.js +46 -0
- package/kernel/router/processor.js +31 -0
- package/kernel/shell.js +141 -60
- package/kernel/shells.js +32 -17
- package/kernel/store.js +58 -0
- package/kernel/sysinfo.js +0 -1
- package/kernel/util.js +143 -36
- package/package.json +4 -1
- package/pipe/index.js +0 -2
- package/script/index.js +12 -0
- package/server/index.js +1473 -553
- package/server/public/Socket.js +5 -1
- package/server/public/SourceCodePro-Regular.ttf +0 -0
- package/server/public/SpaceMono-Bold.ttf +0 -0
- package/server/public/SpaceMono-BoldItalic.ttf +0 -0
- package/server/public/SpaceMono-Italic.ttf +0 -0
- package/server/public/SpaceMono-Regular.ttf +0 -0
- package/server/public/commander.js +40 -0
- package/server/public/common.js +60 -0
- package/server/public/dropzone-min.js +2 -0
- package/server/public/dropzone.css +1 -0
- package/server/public/filepond-plugin-file-validate-type.min.js +9 -0
- package/server/public/filepond-plugin-image-crop.min.js +9 -0
- package/server/public/filepond-plugin-image-edit.min.css +8 -0
- package/server/public/filepond-plugin-image-edit.min.js +9 -0
- package/server/public/filepond-plugin-image-exif-orientation.min.js +9 -0
- package/server/public/filepond-plugin-image-preview.min.css +8 -0
- package/server/public/filepond-plugin-image-preview.min.js +9 -0
- package/server/public/filepond-plugin-image-resize.min.js +9 -0
- package/server/public/filepond-plugin-image-transform.min.js +9 -0
- package/server/public/filepond.min.css +8 -0
- package/server/public/filepond.min.js +9 -0
- package/server/public/fscreator.js +174 -0
- package/server/public/fseditor.js +212 -0
- package/server/public/github.png +0 -0
- package/server/public/highlight-js.js +81 -0
- package/server/public/highlight.css +9 -0
- package/server/public/highlight.js +1244 -0
- package/server/public/install.js +17 -20
- package/server/public/modalinput.js +105 -9
- package/server/public/opener.js +3 -1
- package/server/public/pinokio-black.png +0 -0
- package/server/public/pinokio-black2.png +0 -0
- package/server/public/redoc.standalone.js +1832 -0
- package/server/public/style.css +215 -17
- package/server/public/swagger-ui-bundle.js +2 -0
- package/server/public/swagger-ui.css +3 -0
- package/server/public/x.js +63 -0
- package/server/socket.js +136 -39
- package/server/views/404.ejs +0 -1
- package/server/views/app.ejs +368 -98
- package/server/views/bootstrap.ejs +22 -19
- package/server/views/connect/x.ejs +324 -0
- package/server/views/connect.ejs +197 -0
- package/server/views/download.ejs +7 -1
- package/server/views/editor.ejs +68 -9
- package/server/views/explore.ejs +13 -10
- package/server/views/file_explorer.ejs +10 -37
- package/server/views/github.ejs +218 -0
- package/server/views/help.ejs +4 -3
- package/server/views/index.ejs +275 -121
- package/server/views/install.ejs +56 -29
- package/server/views/keys.ejs +276 -0
- package/server/views/network.ejs +889 -0
- package/server/views/partials/dynamic.ejs +9 -0
- package/server/views/partials/menu.ejs +7 -1
- package/server/views/prototype/index.ejs +311 -0
- package/server/views/prototype/show.ejs +383 -0
- package/server/views/redoc.ejs +18 -0
- package/server/views/required_env_editor.ejs +11 -2
- package/server/views/settings.ejs +38 -10
- package/server/views/setup.ejs +254 -0
- package/server/views/setup_home.ejs +192 -0
- package/server/views/shell.ejs +781 -0
- package/server/views/swaggerui.ejs +19 -0
- package/server/views/terminal.ejs +174 -42
- package/LICENSE +0 -7
- package/server/views/proxy.ejs +0 -405
|
@@ -124,25 +124,28 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
124
124
|
|
|
125
125
|
document.querySelector("#bootstrap").classList.add("hidden")
|
|
126
126
|
document.querySelector(".explain").classList.add("hidden")
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
127
|
+
|
|
128
|
+
<% if (theme === "dark") { %>
|
|
129
|
+
let _theme = xtermTheme.FrontEndDelight
|
|
130
|
+
<% } else { %>
|
|
131
|
+
let _theme = xtermTheme.Tomorrow
|
|
132
|
+
<% } %>
|
|
133
|
+
const theme = Object.assign({ }, _theme, {
|
|
134
|
+
selectionBackground: "red",
|
|
135
|
+
selectionForeground: "white"
|
|
136
|
+
})
|
|
137
|
+
let config = {
|
|
138
|
+
scrollback: 9999999,
|
|
139
|
+
fontSize: 14,
|
|
140
|
+
theme,
|
|
141
|
+
}
|
|
142
|
+
let res = await fetch("/xterm_config").then((res) => {
|
|
143
|
+
return res.json()
|
|
144
|
+
})
|
|
145
|
+
if (res && res.config) {
|
|
146
|
+
config = res.config
|
|
147
|
+
}
|
|
148
|
+
const term = new Terminal(config)
|
|
146
149
|
const fitAddon = new FitAddon.FitAddon();
|
|
147
150
|
term.loadAddon(fitAddon);
|
|
148
151
|
term.loadAddon(new WebLinksAddon.WebLinksAddon());
|
|
@@ -0,0 +1,324 @@
|
|
|
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
|
+
margin: 50px 0;
|
|
104
|
+
flex-grow: 1;
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
}
|
|
108
|
+
.setup-items {
|
|
109
|
+
margin: 0 auto;
|
|
110
|
+
max-width: 800px;
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
a {
|
|
114
|
+
color: royalblue;
|
|
115
|
+
}
|
|
116
|
+
body.dark hr {
|
|
117
|
+
background: rgba(255,255,255,0.05);
|
|
118
|
+
}
|
|
119
|
+
hr {
|
|
120
|
+
background: rgba(0,0,0,0.05);
|
|
121
|
+
height: 4px;
|
|
122
|
+
border: none;
|
|
123
|
+
margin: 40px 0;
|
|
124
|
+
}
|
|
125
|
+
table {
|
|
126
|
+
table-layout: fixed;
|
|
127
|
+
width: 100%;
|
|
128
|
+
}
|
|
129
|
+
td {
|
|
130
|
+
word-wrap:break-word;
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
}
|
|
133
|
+
td.key {
|
|
134
|
+
width: 150px;
|
|
135
|
+
color: royalblue;
|
|
136
|
+
}
|
|
137
|
+
.head {
|
|
138
|
+
padding: 80px;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
.head .desc {
|
|
142
|
+
opacity: 0.7;
|
|
143
|
+
padding: 10px;
|
|
144
|
+
}
|
|
145
|
+
.head h3 {
|
|
146
|
+
font-size: 20px;
|
|
147
|
+
text-transform: uppercase;
|
|
148
|
+
margin: 0;
|
|
149
|
+
}
|
|
150
|
+
.head h3 i {
|
|
151
|
+
font-size: 80px;
|
|
152
|
+
}
|
|
153
|
+
body.dark .card {
|
|
154
|
+
color: white;
|
|
155
|
+
}
|
|
156
|
+
pre {
|
|
157
|
+
text-align: left;
|
|
158
|
+
padding: 0;
|
|
159
|
+
}
|
|
160
|
+
.card {
|
|
161
|
+
text-decoration: none;
|
|
162
|
+
color: rgba(0,0,0,0.9);
|
|
163
|
+
text-align: center;
|
|
164
|
+
margin: 20px;
|
|
165
|
+
}
|
|
166
|
+
.card:hover {
|
|
167
|
+
color: royalblue !important;
|
|
168
|
+
}
|
|
169
|
+
.card .desc {
|
|
170
|
+
opacity: 0.7;
|
|
171
|
+
}
|
|
172
|
+
.card h3 {
|
|
173
|
+
font-size: 30px;
|
|
174
|
+
letter-spacing: -1px;
|
|
175
|
+
}
|
|
176
|
+
.card i {
|
|
177
|
+
font-size: 50px;
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
180
|
+
<link href="/highlight.css" rel="stylesheet" />
|
|
181
|
+
<script src="/hotkeys.min.js"></script>
|
|
182
|
+
<script src="/common.js"></script>
|
|
183
|
+
<script src="/opener.js"></script>
|
|
184
|
+
<script src="/highlight.js"></script>
|
|
185
|
+
<script src="/highlight-js.js"></script>
|
|
186
|
+
</head>
|
|
187
|
+
<body class='<%=theme%>'>
|
|
188
|
+
<header class='navheader grabbable'>
|
|
189
|
+
<h1>
|
|
190
|
+
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
191
|
+
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
192
|
+
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
193
|
+
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
194
|
+
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-globe"></i></div><div>Discover</div></a>
|
|
195
|
+
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
196
|
+
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
197
|
+
<div class='flexible'></div>
|
|
198
|
+
<div class='nav-btns'>
|
|
199
|
+
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
200
|
+
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
201
|
+
<button id='new-window' title='open a new window' class='btn2'><i class="fa-solid fa-plus"></i></button>
|
|
202
|
+
|
|
203
|
+
</div>
|
|
204
|
+
</h1>
|
|
205
|
+
</h1>
|
|
206
|
+
</header>
|
|
207
|
+
<main>
|
|
208
|
+
<div class='head'>
|
|
209
|
+
<h3><i class="fa-brands fa-x-twitter"></i><br><br>Connect with X.com</h3>
|
|
210
|
+
</div>
|
|
211
|
+
<div class='setup-items'>
|
|
212
|
+
<div class='card'>
|
|
213
|
+
<table id='output'></table>
|
|
214
|
+
</div>
|
|
215
|
+
<div class='card'>
|
|
216
|
+
<a target="_blank" href="https://pinokio.localhost/connect/x" features="browser" class='btn hidden' id='https'>START</a>
|
|
217
|
+
<button class='btn hidden' id="login">Login</button>
|
|
218
|
+
<button class='btn hidden' id="logout">Logout</button>
|
|
219
|
+
</div>
|
|
220
|
+
<div id='readme'><%-readme%></div>
|
|
221
|
+
</div>
|
|
222
|
+
</main>
|
|
223
|
+
<script>
|
|
224
|
+
hljs.highlightAll();
|
|
225
|
+
|
|
226
|
+
const render = (kv) => {
|
|
227
|
+
let html = Object.keys(kv).map((key) => {
|
|
228
|
+
return `<tr><td class='key'>${key}</td><td>${kv[key]}</td></tr>`
|
|
229
|
+
}).join("")
|
|
230
|
+
document.querySelector("#output").innerHTML = html
|
|
231
|
+
}
|
|
232
|
+
window.onload = async () => {
|
|
233
|
+
const params = new URLSearchParams(window.location.search);
|
|
234
|
+
const code = params.get('code');
|
|
235
|
+
if (code) {
|
|
236
|
+
const verifier = sessionStorage.getItem('verifier');
|
|
237
|
+
const res = await fetch('/connect/x/login', {
|
|
238
|
+
method: 'POST',
|
|
239
|
+
headers: { 'Content-Type': 'application/json' },
|
|
240
|
+
body: JSON.stringify({
|
|
241
|
+
host: "x.com",
|
|
242
|
+
payload: {
|
|
243
|
+
grant_type: 'authorization_code',
|
|
244
|
+
client_id: clientId,
|
|
245
|
+
redirect_uri: redirectUri,
|
|
246
|
+
code,
|
|
247
|
+
code_verifier: verifier
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
});
|
|
251
|
+
const json = await res.json();
|
|
252
|
+
render(json)
|
|
253
|
+
document.querySelector("#logout").classList.remove("hidden")
|
|
254
|
+
location.href = location.origin + location.pathname
|
|
255
|
+
} else {
|
|
256
|
+
const res = await fetch('/connect/x/keys', {
|
|
257
|
+
method: 'POST',
|
|
258
|
+
headers: { 'Content-Type': 'application/json' },
|
|
259
|
+
body: JSON.stringify({})
|
|
260
|
+
});
|
|
261
|
+
const json = await res.json();
|
|
262
|
+
console.log({ json })
|
|
263
|
+
if (location.hostname === "localhost") {
|
|
264
|
+
// localhost
|
|
265
|
+
// if not logged in => display https link
|
|
266
|
+
// if logged in => render the auth and display logout
|
|
267
|
+
if (json.error) {
|
|
268
|
+
// not logged in
|
|
269
|
+
document.querySelector("#https").classList.remove("hidden")
|
|
270
|
+
} else {
|
|
271
|
+
// logged in
|
|
272
|
+
render(json)
|
|
273
|
+
document.querySelector("#logout").classList.remove("hidden")
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
if (json.error) {
|
|
277
|
+
document.querySelector("#login").classList.remove("hidden")
|
|
278
|
+
} else {
|
|
279
|
+
document.querySelector("#logout").classList.remove("hidden")
|
|
280
|
+
render(json)
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const clientId = '<%=id%>'
|
|
288
|
+
const redirectUri = location.origin + location.pathname
|
|
289
|
+
const scopes = 'tweet.write tweet.read users.read bookmark.write bookmark.read like.write like.read media.write offline.access';
|
|
290
|
+
const codeVerifier = [...crypto.getRandomValues(new Uint8Array(64))].map(x => ('0' + x.toString(16)).slice(-2)).join('');
|
|
291
|
+
async function sha256(str) {
|
|
292
|
+
const buf = new TextEncoder().encode(str);
|
|
293
|
+
const hash = await crypto.subtle.digest('SHA-256', buf);
|
|
294
|
+
return btoa(String.fromCharCode(...new Uint8Array(hash)))
|
|
295
|
+
.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
296
|
+
}
|
|
297
|
+
if (document.querySelector("#login")) {
|
|
298
|
+
document.querySelector("#login").addEventListener("click", async (e) => {
|
|
299
|
+
const challenge = await sha256(codeVerifier);
|
|
300
|
+
sessionStorage.setItem('verifier', codeVerifier);
|
|
301
|
+
const url = `https://x.com/i/oauth2/authorize` +
|
|
302
|
+
`?response_type=code&client_id=${clientId}` +
|
|
303
|
+
`&redirect_uri=${encodeURIComponent(redirectUri)}` +
|
|
304
|
+
//`&redirect_uri=${redirectUri}` +
|
|
305
|
+
`&scope=${encodeURIComponent(scopes)}` +
|
|
306
|
+
`&state=123&code_challenge=${challenge}&code_challenge_method=S256`;
|
|
307
|
+
window.location.href = url;
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
if (document.querySelector("#logout")) {
|
|
311
|
+
document.querySelector("#logout").addEventListener("click", async (e) => {
|
|
312
|
+
const res = await fetch('/connect/x/logout', {
|
|
313
|
+
method: 'POST',
|
|
314
|
+
headers: { 'Content-Type': 'application/json' },
|
|
315
|
+
body: JSON.stringify({})
|
|
316
|
+
});
|
|
317
|
+
const json = await res.json();
|
|
318
|
+
location.href = location.href
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
</script>
|
|
323
|
+
</body>
|
|
324
|
+
</html>
|
|
@@ -0,0 +1,197 @@
|
|
|
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: 20px;
|
|
121
|
+
text-transform: uppercase;
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
.head h3 i {
|
|
125
|
+
font-size: 80px;
|
|
126
|
+
}
|
|
127
|
+
body.dark .card {
|
|
128
|
+
color: white;
|
|
129
|
+
}
|
|
130
|
+
.card {
|
|
131
|
+
text-decoration: none;
|
|
132
|
+
width: 200px;
|
|
133
|
+
color: rgba(0,0,0,0.9);
|
|
134
|
+
text-align: center;
|
|
135
|
+
height: 400px;
|
|
136
|
+
margin: 20px;
|
|
137
|
+
}
|
|
138
|
+
.card:hover {
|
|
139
|
+
color: royalblue !important;
|
|
140
|
+
}
|
|
141
|
+
.card .desc {
|
|
142
|
+
opacity: 0.7;
|
|
143
|
+
}
|
|
144
|
+
.card h3 {
|
|
145
|
+
font-size: 30px;
|
|
146
|
+
letter-spacing: -1px;
|
|
147
|
+
}
|
|
148
|
+
.card i {
|
|
149
|
+
font-size: 50px;
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
152
|
+
<script src="/hotkeys.min.js"></script>
|
|
153
|
+
<script src="/common.js"></script>
|
|
154
|
+
<script src="/opener.js"></script>
|
|
155
|
+
</head>
|
|
156
|
+
<body class='<%=theme%>'>
|
|
157
|
+
<header class='navheader grabbable'>
|
|
158
|
+
<h1>
|
|
159
|
+
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
160
|
+
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
161
|
+
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
162
|
+
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
163
|
+
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-globe"></i></div><div>Discover</div></a>
|
|
164
|
+
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
165
|
+
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
166
|
+
<div class='flexible'></div>
|
|
167
|
+
<div class='nav-btns'>
|
|
168
|
+
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
169
|
+
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></button>
|
|
170
|
+
<a id='downloadlogs' download class='hidden btn2' href="/pinokio/logs.zip"><div><i class="fa-solid fa-download"></i></div><div>Download logs</div></a>
|
|
171
|
+
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
172
|
+
<% if (agent === "electron") { %>
|
|
173
|
+
<a href="/" target="_blank" class='btn2' features="browser"><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
174
|
+
<% } else { %>
|
|
175
|
+
<a href="/" target="_blank" class='btn2'><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
176
|
+
<% } %>
|
|
177
|
+
<button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
|
|
178
|
+
</div>
|
|
179
|
+
</h1>
|
|
180
|
+
</h1>
|
|
181
|
+
</header>
|
|
182
|
+
<main>
|
|
183
|
+
<div class='head'>
|
|
184
|
+
<h3><i class="fa-solid fa-circle-user"></i><br><br>Connect with 3rd Party</h3>
|
|
185
|
+
</div>
|
|
186
|
+
<div class='setup-items'>
|
|
187
|
+
<% items.forEach((item) => { %>
|
|
188
|
+
<a class='card' href="<%=item.url%>">
|
|
189
|
+
<i class="<%=item.icon%>"></i>
|
|
190
|
+
<h3><%=item.title%></h3>
|
|
191
|
+
<div class='desc'><%=item.description%></div>
|
|
192
|
+
</a>
|
|
193
|
+
<% }) %>
|
|
194
|
+
</div>
|
|
195
|
+
</main>
|
|
196
|
+
</body>
|
|
197
|
+
</html>
|
|
@@ -220,7 +220,13 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
220
220
|
// let name = "0x" + url.split("").map(c => c.charCodeAt(0).toString(16).padStart(2, "0")).join("");
|
|
221
221
|
let name = await installname(url)
|
|
222
222
|
if (name) {
|
|
223
|
-
if (!term)
|
|
223
|
+
if (!term) {
|
|
224
|
+
<% if (theme === "dark") { %>
|
|
225
|
+
term = await createTerm(xtermTheme.FrontEndDelight)
|
|
226
|
+
<% } else { %>
|
|
227
|
+
term = await createTerm(xtermTheme.Tomorrow)
|
|
228
|
+
<% } %>
|
|
229
|
+
}
|
|
224
230
|
let params = new URLSearchParams(location.search)
|
|
225
231
|
let entries = [...params.entries()]
|
|
226
232
|
let options;
|