@trusty-squire/mcp 0.7.5 → 0.7.7
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/assets/login/vnc.html +14 -26
- package/package.json +1 -1
package/assets/login/vnc.html
CHANGED
|
@@ -29,25 +29,17 @@
|
|
|
29
29
|
flex: none; }
|
|
30
30
|
#dot.ok { background: #3fb950; }
|
|
31
31
|
#dot.err { background: #f85149; }
|
|
32
|
-
/*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
/* overflow:hidden + min-width:0 are load-bearing for scaleViewport.
|
|
33
|
+
The canvas noVNC appends inside #screen reports its native
|
|
34
|
+
framebuffer width (720px on the headless rig) as its intrinsic
|
|
35
|
+
width. Without these two declarations, the flex item's
|
|
36
|
+
cross-axis (row) min-width defaults to that content width and
|
|
37
|
+
grows #screen past the viewport. noVNC reads #screen's
|
|
38
|
+
bounding rect to pick the scale factor, sees 720, computes
|
|
39
|
+
ratio 1.0, and never scales. The official vnc_lite.html uses
|
|
40
|
+
the same `overflow:hidden` trick. */
|
|
41
41
|
#screen { flex: 1; position: relative; background: #0f1115;
|
|
42
|
-
min-height: 0; min-width: 0;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
display: flex; align-items: center; justify-content: center; }
|
|
45
|
-
#screen > canvas {
|
|
46
|
-
display: block !important;
|
|
47
|
-
width: 100% !important;
|
|
48
|
-
height: auto !important;
|
|
49
|
-
max-height: 100% !important;
|
|
50
|
-
}
|
|
42
|
+
min-height: 0; min-width: 0; overflow: hidden; }
|
|
51
43
|
/* Overlay siblings of #screen — `position: fixed` against the
|
|
52
44
|
viewport, NOT positioned inside #screen. RFB appends a <canvas>
|
|
53
45
|
child to #screen at connect time, and that canvas can cover any
|
|
@@ -107,12 +99,12 @@
|
|
|
107
99
|
<script type="module">
|
|
108
100
|
import RFB from "./core/rfb.js";
|
|
109
101
|
|
|
110
|
-
// The VNC password rides in the URL fragment (#
|
|
102
|
+
// The VNC password rides in the URL fragment (#password=...), never
|
|
111
103
|
// the query string — a fragment is never sent to the server, so the
|
|
112
104
|
// secret stays out of the cloudflared edge logs and any proxy.
|
|
113
|
-
// Accept the legacy `password=` key too in case any old bookmark
|
|
114
|
-
// outlived the rename.
|
|
115
105
|
const params = new URLSearchParams(location.hash.replace(/^#/, ""));
|
|
106
|
+
// Accept both `p=` (current, short) and `password=` (legacy) so any
|
|
107
|
+
// saved URL keeps working.
|
|
116
108
|
const password = params.get("p") || params.get("password") || "";
|
|
117
109
|
const dot = document.getElementById("dot");
|
|
118
110
|
const msg = document.getElementById("msg");
|
|
@@ -128,11 +120,7 @@
|
|
|
128
120
|
let rfb;
|
|
129
121
|
try {
|
|
130
122
|
rfb = new RFB(screen, wsUrl, { credentials: { password }, shared: true });
|
|
131
|
-
|
|
132
|
-
// canvas styling above does aspect-preserving fit-to-width in
|
|
133
|
-
// pure CSS; touching either of these from JS introduces races
|
|
134
|
-
// we can't win on first paint.
|
|
135
|
-
rfb.scaleViewport = false;
|
|
123
|
+
rfb.scaleViewport = true;
|
|
136
124
|
rfb.resizeSession = false;
|
|
137
125
|
} catch (err) {
|
|
138
126
|
dot.className = "err";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusty-squire/mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"mcpName": "io.github.Trusty-Squire/mcp",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local MCP server vibe coding agents install. Thin relay to the Trusty Squire API, with the bundled universal signup bot.",
|