pinokiod 1.3.60 → 1.3.62

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.
@@ -0,0 +1,196 @@
1
+ <html class='columns'>
2
+ <head>
3
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
4
+ <script src="/hotkeys.min.js"></script>
5
+ <script src="/ace/ace.js"></script>
6
+ <script src="/noty.js"></script>
7
+ <script src="/notyq.js"></script>
8
+ <script src="/xterm.js"></script>
9
+ <script src="/xterm-addon-fit.js"></script>
10
+ <script src="/xterm-addon-web-links.js"></script>
11
+ <script src="/xterm-theme.js"></script>
12
+ <script src="/xterm-addon-search.js"></script>
13
+ <script src="/xterm-addon-search-bar.js"></script>
14
+ <script src="/sweetalert2.js"></script>
15
+ <script src="/Socket.js"></script>
16
+ <script src="/common.js"></script>
17
+ <script src="/he.js"></script>
18
+ <script src="/opener.js"></script>
19
+ <script src="/nav.js"></script>
20
+ <script src="/autoexpand.js"></script>
21
+ <script src="/modalinput.js"></script>
22
+ <script src="/simplemodal.js"></script>
23
+ <script src="/waitmodal.js"></script>
24
+ <script src="/notifyinput.js"></script>
25
+ <script src="/report.js"></script>
26
+ <link href="/xterm.min.css" rel="stylesheet" />
27
+ <link href="/css/fontawesome.min.css" rel="stylesheet">
28
+ <link href="/css/solid.min.css" rel="stylesheet">
29
+ <link href="/css/regular.min.css" rel="stylesheet">
30
+ <link href="/css/brands.min.css" rel="stylesheet">
31
+ <link href="/style.css" rel="stylesheet"/>
32
+ <link href="/noty.css" rel="stylesheet"/>
33
+ <% if (agent === "electron") { %>
34
+ <link href="/electron.css" rel="stylesheet"/>
35
+ <% } %>
36
+ <style>
37
+ body.frozen {
38
+ display: flex;
39
+ flex-direction: column;
40
+ height: 100%;
41
+ }
42
+ #table > table {
43
+ border-left: 2px solid black;
44
+ padding-left: 5px;
45
+ margin: 10px 0;
46
+ }
47
+ .highlight {
48
+ background: yellow;
49
+ width: 100px;
50
+ }
51
+ th {
52
+ background: rgba(0,0,0,0.1);
53
+ padding: 10px;
54
+ font-size: 12px;
55
+ }
56
+ td {
57
+ font-size: 12px;
58
+ padding: 10px;
59
+ }
60
+ td.val {
61
+ background: rgba(0,0,0,0.06);
62
+ }
63
+ td.key {
64
+ background: rgba(0,0,0,0.1);
65
+ }
66
+ .button {
67
+ cursor: pointer;
68
+ background: rgba(0,0,0,0.8);
69
+ color: white;
70
+ padding: 5px 10px;
71
+ border-radius: 4px;
72
+ }
73
+ .button:hover {
74
+
75
+ }
76
+ #editor {
77
+ box-sizing: border-box;
78
+ max-width: 800px;
79
+ padding: 20px;
80
+ }
81
+ header .runner {
82
+ padding: 10px 0 0;
83
+ }
84
+ .disabled {
85
+ opacity: 0.7;
86
+ }
87
+ body.dark .env-item input[type=text] {
88
+ background: white;
89
+ }
90
+ .env-item input[type=text] {
91
+ width: 100%;
92
+ padding: 10px;
93
+ box-sizing: border-box;
94
+ border: none;
95
+ background: rgba(0,0,100, 0.1);
96
+ }
97
+ body.dark .env-item label {
98
+ color: cornflowerblue;
99
+ }
100
+ .env-item a {
101
+ color: royalblue;
102
+ text-decoration: none;
103
+ }
104
+ .env-item div {
105
+ padding: 5px;
106
+ }
107
+ .env-item label {
108
+ color: royalblue;
109
+ display: inline-block;
110
+ margin-bottom: 5px;
111
+ font-weight: bold;
112
+ }
113
+ .env-item {
114
+ padding-top: 10px;
115
+ padding-bottom: 30px;
116
+ }
117
+ body.dark .comment {
118
+ border-left: 2px solid white;
119
+ }
120
+ .comment {
121
+ opacity: 0.8;
122
+ border-left: 2px solid black;
123
+ padding-left: 10px;
124
+ }
125
+ #save {
126
+ background: royalblue;
127
+ }
128
+ hr {
129
+ margin: 20px 0;
130
+ background: rgba(255,255,255,0.1);
131
+ border: none;
132
+ height: 1px;
133
+ }
134
+ </style>
135
+ <script>
136
+ document.addEventListener("DOMContentLoaded", async () => {
137
+ const n = new N()
138
+ document.querySelector("#save").addEventListener("click", async (e) => {
139
+ // save
140
+ const vals = {}
141
+ const els = document.querySelectorAll(".env-item input[type=checkbox]")
142
+ for(let el of els) {
143
+ vals[el.id] = el.checked
144
+ }
145
+ let res = await fetch("/env", {
146
+ method: "POST",
147
+ headers: {
148
+ "Content-Type": "application/json"
149
+ },
150
+ body: JSON.stringify({
151
+ filepath: "api/" + location.pathname.slice(7) + "/ENVIRONMENT",
152
+ vals
153
+ })
154
+ }).then((res) => {
155
+ return res.json()
156
+ })
157
+ n.Noty({
158
+ text: `Updated! Restart the app to apply the change.`
159
+ })
160
+ })
161
+ })
162
+ </script>
163
+ </head>
164
+ <body class='columns <%=theme%>'>
165
+ <main>
166
+ <div id='editor'>
167
+ <h1>Share Apps</h1>
168
+ <div>You can open up your local Pinokio node to the outside world, or any other device on the same network, instantly.</div>
169
+ <hr>
170
+ <div class='env-item'>
171
+ <% if (config.PINOKIO_SHARE_CLOUDFLARE.toString() === "true") { %>
172
+ <input type="checkbox" id="PINOKIO_SHARE_CLOUDFLARE" name="cloudflare" checked />
173
+ <% } else { %>
174
+ <input type="checkbox" id="PINOKIO_SHARE_CLOUDFLARE" name="cloudflare" />
175
+ <% } %>
176
+ <label for="cloudflare">Share Publicly</label>
177
+ <div>This will set the PINOKIO_SHARE_CLOUDFLARE environment variable to true, and share your local app to the public internet, powered by <a href="https://www.cloudflare.com/products/tunnel/" target="_blank" features="browser">Cloudflare Tunnel</a></div>
178
+ </div>
179
+ <div class='env-item'>
180
+ <% if (config.PINOKIO_SHARE_LOCAL.toString() === "true") { %>
181
+ <input type="checkbox" id="PINOKIO_SHARE_LOCAL" name="local" checked />
182
+ <% } else { %>
183
+ <input type="checkbox" id="PINOKIO_SHARE_LOCAL" name="local" />
184
+ <% } %>
185
+ <label for="local">Share with Local Network Devices</label>
186
+ <div>This will set the PINOKIO_SHARE_LOCAL environment variable to true, and share your local app to any device on the same local network</div>
187
+ </div>
188
+ <div class='runner'>
189
+ <div id='save' class='btn'>
190
+ <span class='save'><i class="fa-solid fa-check"></i> Save</span>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </main>
195
+ </body>
196
+ </html>