pinokiod 3.8.10 → 3.8.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.8.10",
3
+ "version": "3.8.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -109,26 +109,23 @@ const install = async (name, url, term, socket, options) => {
109
109
 
110
110
  }
111
111
  }
112
- const createTerm = () => {
113
- const term = new Terminal({
114
- //theme: xtermTheme.Piatto_Light,
115
- //theme: xtermTheme.Github,
116
- //theme: xtermTheme.Cobalt_Neon, // top legibility
117
- //theme: xtermTheme.Duotone_Dark,
118
- theme: xtermTheme.FrontEndDelight,
119
- //theme: xtermTheme.Seafoam_Pastel,
120
- //theme: xtermTheme.IC_Green_PPL,
121
- //theme: xtermTheme.FunForrest,
122
- //theme: xtermTheme.Jackie_Brown,
123
- //theme: xtermTheme.Ocean,
124
-
125
- //theme: xtermTheme.Blazer,
126
- //theme: xtermTheme.BirdsOfParadise,
127
- //theme: xtermTheme.AtelierSulphurpool,
128
- //theme: xtermTheme.Borland,
129
- rows: 20,
130
- fontSize: 12
131
- });
112
+ const createTerm = async () => {
113
+ const theme = Object.assign({ }, xtermTheme.Terminal_Basic, {
114
+ selectionBackground: "red",
115
+ selectionForeground: "white"
116
+ })
117
+ let config = {
118
+ scrollback: 9999999,
119
+ fontSize: 14,
120
+ theme,
121
+ }
122
+ let res = await fetch("/xterm_config").then((res) => {
123
+ return res.json()
124
+ })
125
+ if (res && res.config) {
126
+ config = res.config
127
+ }
128
+ const term = new Terminal(config)
132
129
  const fitAddon = new FitAddon.FitAddon();
133
130
  term.loadAddon(fitAddon);
134
131
  term.loadAddon(new WebLinksAddon.WebLinksAddon());
@@ -1,9 +1,3 @@
1
- @font-face {
2
- font-family: 'SpaceMono';
3
- src: url('SpaceMono-Regular.ttf') format(truetype);
4
- font-weight: normal;
5
- font-style: normal;
6
- }
7
1
  :root {
8
2
  --content-width: 900px;
9
3
 
@@ -59,6 +53,18 @@
59
53
  */
60
54
  --dark-btn-color: whitesmoke;
61
55
  }
56
+ @font-face {
57
+ font-family: 'SpaceMono';
58
+ src: url('./SpaceMono-Regular.ttf') format(truetype);
59
+ font-weight: normal;
60
+ font-style: normal;
61
+ }
62
+ @font-face {
63
+ font-family: 'SourceCode';
64
+ src: url('./SourceCodePro-Regular.ttf') format(truetype);
65
+ font-weight: normal;
66
+ font-style: normal;
67
+ }
62
68
  .drawer {
63
69
  max-height: 100000px;
64
70
  overflow: hidden;
@@ -580,6 +586,9 @@ body.columns main #editor {
580
586
 
581
587
  height: 100%;
582
588
  /*
589
+ padding: 15px 0;
590
+ */
591
+ /*
583
592
  overflow: auto;
584
593
  */
585
594
  box-sizing: border-box;
@@ -622,6 +631,7 @@ body.columns .containers {
622
631
  height: 100%;
623
632
  }
624
633
  .terminal-container {
634
+ padding: 10px 0;
625
635
  background: white;
626
636
  flex-grow: 1;
627
637
  position: relative;
@@ -706,13 +716,16 @@ body.columns .containers {
706
716
  }
707
717
  */
708
718
  .xterm-rows {
709
- font-family: "Space Mono", monospace !important;
719
+ /*
720
+ font-family: "SpaceMono", monospace !important;
721
+ */
722
+ font-family: "SourceCode", monospace !important;
710
723
  font-weight: 400 !important;
711
724
  font-style: normal !important;
712
725
 
713
726
  }
714
727
  .xterm {
715
- padding: 0 20px !important;
728
+ padding: 0 10px !important;
716
729
  /*
717
730
  padding: 10px 20px !important;
718
731
  */
@@ -2,7 +2,6 @@
2
2
  <head>
3
3
  <meta charset="UTF-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <link href="/xterm.min.css" rel="stylesheet" />
6
5
  <link href="/css/fontawesome.min.css" rel="stylesheet">
7
6
  <link href="/css/solid.min.css" rel="stylesheet">
8
7
  <link href="/css/regular.min.css" rel="stylesheet">
@@ -124,25 +124,23 @@ document.addEventListener("DOMContentLoaded", () => {
124
124
 
125
125
  document.querySelector("#bootstrap").classList.add("hidden")
126
126
  document.querySelector(".explain").classList.add("hidden")
127
- const term = new Terminal({
128
- //theme: xtermTheme.Piatto_Light,
129
- //theme: xtermTheme.Github,
130
- //theme: xtermTheme.Cobalt_Neon, // top legibility
131
- //theme: xtermTheme.Duotone_Dark,
132
- //theme: xtermTheme.Seafoam_Pastel,
133
- //theme: xtermTheme.IC_Green_PPL,
134
- //theme: xtermTheme.FunForrest,
135
- //theme: xtermTheme.Jackie_Brown,
136
- theme: xtermTheme.FrontEndDelight,
137
- //theme: xtermTheme.Ocean,
138
-
139
- //theme: xtermTheme.Blazer,
140
- //theme: xtermTheme.BirdsOfParadise,
141
- //theme: xtermTheme.AtelierSulphurpool,
142
- //theme: xtermTheme.Borland,
143
- rows: 20,
144
- fontSize: 12
145
- });
127
+
128
+ const theme = Object.assign({ }, xtermTheme.Terminal_Basic, {
129
+ selectionBackground: "red",
130
+ selectionForeground: "white"
131
+ })
132
+ let config = {
133
+ scrollback: 9999999,
134
+ fontSize: 14,
135
+ theme,
136
+ }
137
+ let res = await fetch("/xterm_config").then((res) => {
138
+ return res.json()
139
+ })
140
+ if (res && res.config) {
141
+ config = res.config
142
+ }
143
+ const term = new Terminal(config)
146
144
  const fitAddon = new FitAddon.FitAddon();
147
145
  term.loadAddon(fitAddon);
148
146
  term.loadAddon(new WebLinksAddon.WebLinksAddon());
@@ -220,7 +220,7 @@ 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) term = createTerm()
223
+ if (!term) term = await createTerm()
224
224
  let params = new URLSearchParams(location.search)
225
225
  let entries = [...params.entries()]
226
226
  let options;
@@ -593,9 +593,14 @@ document.addEventListener("DOMContentLoaded", async () => {
593
593
  }
594
594
  async createTerm () {
595
595
  if (!this.term) {
596
+ const theme = Object.assign({ }, xtermTheme.Terminal_Basic, {
597
+ selectionBackground: "red",
598
+ selectionForeground: "white"
599
+ })
596
600
  let config = {
597
- fontSize: 12,
598
- theme: xtermTheme.FrontEndDelight
601
+ scrollback: 9999999,
602
+ fontSize: 14,
603
+ theme,
599
604
  }
600
605
  let res = await fetch("/xterm_config").then((res) => {
601
606
  return res.json()
@@ -3,7 +3,6 @@
3
3
  <title>Pinokio</title>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
6
- <link href="/xterm.min.css" rel="stylesheet" />
7
6
  <link href="/css/fontawesome.min.css" rel="stylesheet">
8
7
  <link href="/css/solid.min.css" rel="stylesheet">
9
8
  <link href="/css/regular.min.css" rel="stylesheet">
@@ -141,10 +140,6 @@ body.dark .browser-options-row {
141
140
  <script src="/sweetalert2.js"></script>
142
141
  <script src="/noty.js"></script>
143
142
  <script src="/notyq.js"></script>
144
- <script src="/xterm.js"></script>
145
- <script src="/xterm-addon-fit.js"></script>
146
- <script src="/xterm-addon-web-links.js"></script>
147
- <script src="/xterm-theme.js"></script>
148
143
  <script src="/Socket.js"></script>
149
144
  <script src="/install.js"></script>
150
145
  <script src="/common.js"></script>
@@ -127,8 +127,10 @@ body {
127
127
  <script src="/common.js"></script>
128
128
  </head>
129
129
  <body class='<%=theme%>'>
130
+ <!--
130
131
  <header class='grabbable'></header>
131
- <div id='status-screen'><b><i class="fas fa-circle-notch fa-spin"></i></div>
132
+ -->
133
+ <div id='status-screen'><b><i class="fas fa-circle-notch fa-spin"></i></b></div>
132
134
  <div class='terminal-container'>
133
135
  <div id='terminal'></div>
134
136
  </div>
@@ -138,31 +140,23 @@ body {
138
140
  //
139
141
  // /install_bin?type=bin&uri=conda
140
142
  //
141
- const createTerm = () => {
142
- const term = new Terminal({
143
- //theme: xtermTheme.Piatto_Light,
144
- //theme: xtermTheme.Spring,
145
-
146
- //theme: xtermTheme.Github,
147
-
148
- //theme: xtermTheme.Cobalt_Neon, // top legibility
149
- //theme: xtermTheme.Duotone_Dark,
150
- theme: xtermTheme.FrontEndDelight,
151
- //theme: xtermTheme.Seafoam_Pastel,
152
- //theme: xtermTheme.IC_Green_PPL,
153
- //theme: xtermTheme.FunForrest,
154
- //theme: xtermTheme.Jackie_Brown,
155
- //theme: xtermTheme.Ocean,
156
-
157
- //theme: xtermTheme.Blazer,
158
- //theme: xtermTheme.BirdsOfParadise,
159
- //theme: xtermTheme.AtelierSulphurpool,
160
- //theme: xtermTheme.Borland,
161
- fontSize: 12,
162
- //cursorBlink: false,
163
- //cursorStyle: 'block'
164
-
165
- });
143
+ const createTerm = async () => {
144
+ const theme = Object.assign({ }, xtermTheme.Terminal_Basic, {
145
+ selectionBackground: "red",
146
+ selectionForeground: "white"
147
+ })
148
+ let config = {
149
+ scrollback: 9999999,
150
+ fontSize: 14,
151
+ theme,
152
+ }
153
+ let res = await fetch("/xterm_config").then((res) => {
154
+ return res.json()
155
+ })
156
+ if (res && res.config) {
157
+ config = res.config
158
+ }
159
+ const term = new Terminal(config)
166
160
  term.open(document.querySelector("#terminal"))
167
161
 
168
162
  term.attachCustomKeyEventHandler(event => {
@@ -191,7 +185,7 @@ const createTerm = () => {
191
185
  document.addEventListener("DOMContentLoaded", async () => {
192
186
  const n = new N()
193
187
  let socket = new Socket()
194
- let term = createTerm()
188
+ let term = await createTerm()
195
189
  let params = new URLSearchParams(location.search)
196
190
  let entries = [...params.entries()]
197
191
  let options;
@@ -108,6 +108,9 @@ header {
108
108
  .navheader3 {
109
109
  padding: 10px;
110
110
  }
111
+ .navheader {
112
+ padding-bottom: 0;
113
+ }
111
114
  /*
112
115
  .navheader {
113
116
  background: var(--dark-bg);
@@ -128,6 +131,9 @@ header {
128
131
  body.frozen {
129
132
  overflow: auto !important;
130
133
  }
134
+ .terminal-container {
135
+ padding: 0;
136
+ }
131
137
  </style>
132
138
  <link href="/terminal.css" rel="stylesheet"/>
133
139
  <script>
@@ -853,26 +853,26 @@ const reloadMemory = async () => {
853
853
  <% } else { %>
854
854
  <body class='<%=theme%>'>
855
855
  <% } %>
856
- <header class='navheader2'>
857
856
  <% if (!install_required) { %>
858
- <div class='runner'>
859
- <% if (locals.prev) { %>
860
- <a class='btn' href="<%=prev%>"><i class="fa-solid fa-arrow-left"></i> Back</a>
861
- <% } %>
862
- <div class='btn run <%= mod && runnable ? "" : "hidden" %>'>
863
- <span class='play'><i class="fa-solid fa-play"></i> Start</span>
864
- <span class='starting hidden'><i class="fa-solid fa-circle-notch fa-spin"></i> Starting...</span>
865
- <span class='stop hidden'><i class="fa-solid fa-stop"></i> Stop</span>
857
+ <header class='navheader2'>
858
+ <div class='runner'>
859
+ <% if (locals.prev) { %>
860
+ <a class='btn' href="<%=prev%>"><i class="fa-solid fa-arrow-left"></i> Back</a>
861
+ <% } %>
862
+ <div class='btn run <%= mod && runnable ? "" : "hidden" %>'>
863
+ <span class='play'><i class="fa-solid fa-play"></i> Start</span>
864
+ <span class='starting hidden'><i class="fa-solid fa-circle-notch fa-spin"></i> Starting...</span>
865
+ <span class='stop hidden'><i class="fa-solid fa-stop"></i> Stop</span>
866
+ </div>
867
+ <% if (locals.filepath) { %>
868
+ <button class='btn' id='open-fs' data-filepath="<%=filepath%>"><i class="fa-solid fa-eye"></i> View File</button>
869
+ <% } %>
870
+ <!--
871
+ <button class='btn' id='open-log' data-logpath="<%=logpath%>"><i class="fa-solid fa-align-left"></i> View Logs</button>
872
+ -->
866
873
  </div>
867
- <% if (locals.filepath) { %>
868
- <button class='btn' id='open-fs' data-filepath="<%=filepath%>"><i class="fa-solid fa-eye"></i> View File</button>
869
- <% } %>
870
- <!--
871
- <button class='btn' id='open-log' data-logpath="<%=logpath%>"><i class="fa-solid fa-align-left"></i> View Logs</button>
872
- -->
873
- </div>
874
+ </header>
874
875
  <% } %>
875
- </header>
876
876
  <% if (locals.requirements_pending) { %>
877
877
  <div class='requirements'>
878
878
  <div class='content'>