clay-server 2.17.0-beta.4 → 2.17.0-beta.5
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/bin/cli.js +1 -1
- package/lib/daemon.js +1 -1
- package/lib/public/app.js +2 -2
- package/lib/public/css/overlays.css +22 -21
- package/lib/public/css/title-bar.css +0 -4
- package/lib/public/index.html +6 -4
- package/lib/server.js +13 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -2251,7 +2251,7 @@ function showSetupGuide(config, ip, goBack) {
|
|
|
2251
2251
|
// mkcert: use HTTP onboarding server for CA install flow
|
|
2252
2252
|
var setupUrl;
|
|
2253
2253
|
if (config.builtinCert) {
|
|
2254
|
-
setupUrl = toClayStudioUrl(setupIP, config.port, "https") + "
|
|
2254
|
+
setupUrl = toClayStudioUrl(setupIP, config.port, "https") + "/pwa";
|
|
2255
2255
|
} else if (config.tls) {
|
|
2256
2256
|
setupUrl = "http://" + setupIP + ":" + (config.port + 1) + "/setup" + setupQuery;
|
|
2257
2257
|
} else {
|
package/lib/daemon.js
CHANGED
|
@@ -94,7 +94,7 @@ var caRoot = null;
|
|
|
94
94
|
try {
|
|
95
95
|
var { execSync } = require("child_process");
|
|
96
96
|
caRoot = path.join(
|
|
97
|
-
execSync("mkcert -CAROOT", { encoding: "utf8" }).trim(),
|
|
97
|
+
execSync("mkcert -CAROOT", { encoding: "utf8", stdio: "pipe" }).trim(),
|
|
98
98
|
"rootCA.pem"
|
|
99
99
|
);
|
|
100
100
|
if (!fs.existsSync(caRoot)) caRoot = null;
|
package/lib/public/app.js
CHANGED
|
@@ -6766,10 +6766,10 @@ import { initLongPress } from './modules/longpress.js';
|
|
|
6766
6766
|
modal.querySelector(".pwa-modal-backdrop").addEventListener("click", closeModal);
|
|
6767
6767
|
|
|
6768
6768
|
confirmBtn.addEventListener("click", function () {
|
|
6769
|
-
// Builtin cert (*.d.clay.studio): open
|
|
6769
|
+
// Builtin cert (*.d.clay.studio): open PWA setup guide
|
|
6770
6770
|
if (location.hostname.endsWith(".d.clay.studio")) {
|
|
6771
6771
|
closeModal();
|
|
6772
|
-
|
|
6772
|
+
location.href = "/pwa";
|
|
6773
6773
|
return;
|
|
6774
6774
|
}
|
|
6775
6775
|
// mkcert / other: redirect to onboarding setup page
|
|
@@ -44,36 +44,37 @@ button.top-bar-pill.pill-success:hover { background: color-mix(in srgb, var(--su
|
|
|
44
44
|
button.top-bar-pill.pill-accent:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
|
|
45
45
|
|
|
46
46
|
/* PWA install button — left side of top bar, icon only */
|
|
47
|
-
.top-bar-
|
|
47
|
+
.top-bar-left-pills {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 6px;
|
|
48
51
|
position: absolute;
|
|
49
52
|
left: 10px;
|
|
50
|
-
top:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
top: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
}
|
|
56
|
+
.top-bar-install-btn {
|
|
57
|
+
display: inline-flex;
|
|
53
58
|
align-items: center;
|
|
54
|
-
|
|
55
|
-
background:
|
|
56
|
-
border: none;
|
|
57
|
-
border-radius: 6px;
|
|
59
|
+
gap: 4px;
|
|
60
|
+
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
|
58
61
|
color: var(--accent);
|
|
62
|
+
border: none;
|
|
63
|
+
border-radius: 10px;
|
|
64
|
+
padding: 2px 10px;
|
|
65
|
+
font-family: inherit;
|
|
66
|
+
font-size: 11px;
|
|
67
|
+
font-weight: 600;
|
|
59
68
|
cursor: pointer;
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
line-height: 1;
|
|
71
|
+
transition: background 0.15s;
|
|
62
72
|
}
|
|
63
|
-
.top-bar-install-btn .lucide { width:
|
|
64
|
-
.top-bar-install-btn:hover { background: color-mix(in srgb, var(--accent)
|
|
73
|
+
.top-bar-install-btn .lucide { width: 12px; height: 12px; }
|
|
74
|
+
.top-bar-install-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
|
|
65
75
|
.top-bar-install-btn.hidden { display: none; }
|
|
66
76
|
.pwa-standalone .top-bar-install-btn { display: none !important; }
|
|
67
77
|
|
|
68
|
-
@media (max-width: 768px) {
|
|
69
|
-
.top-bar-install-btn {
|
|
70
|
-
top: auto;
|
|
71
|
-
bottom: 0;
|
|
72
|
-
height: 32px;
|
|
73
|
-
transform: none;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
78
|
/* PWA install modal */
|
|
78
79
|
.pwa-modal {
|
|
79
80
|
position: fixed;
|
package/lib/public/index.html
CHANGED
|
@@ -29,15 +29,17 @@
|
|
|
29
29
|
<div id="layout">
|
|
30
30
|
<!-- === Top Bar (full width, forms reverse-ㄱ with icon strip) === -->
|
|
31
31
|
<div id="top-bar">
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<div class="top-bar-left-pills">
|
|
33
|
+
<button id="pwa-install-pill" class="top-bar-install-btn hidden" title="Open as app"><i data-lucide="download"></i> Open as app</button>
|
|
34
|
+
<div id="update-pill-wrap" class="top-bar-update hidden">
|
|
35
|
+
<button id="update-pill" class="top-bar-update-btn"><i data-lucide="arrow-up-circle"></i> <span id="update-version"></span> is available. Update now</button>
|
|
36
36
|
<div id="update-popover" class="top-bar-popover">
|
|
37
37
|
<div class="popover-row"><button id="update-now" class="popover-action popover-action-primary"><i data-lucide="download"></i> Update now</button></div>
|
|
38
38
|
<div class="popover-row"><div class="popover-label">Or run manually:</div><div class="popover-cmd"><code id="update-manual-cmd">npx clay-server@latest</code><button class="popover-copy" title="Copy"><i data-lucide="copy"></i></button></div></div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<button id="cmd-palette-btn" class="cmd-palette-searchbar" title="Command palette"><i data-lucide="search"></i><span class="cmd-palette-searchbar-text">Search sessions, projects, and commands</span><kbd class="cmd-palette-searchbar-kbd"></kbd></button>
|
|
41
43
|
<div class="top-bar-actions">
|
|
42
44
|
<!-- Pill badges -->
|
|
43
45
|
<div id="skip-perms-pill" class="top-bar-pill pill-error hidden"><i data-lucide="shield-off"></i> <span>Skip perms</span></div>
|
package/lib/server.js
CHANGED
|
@@ -1017,6 +1017,19 @@ function createServer(opts) {
|
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
1019
|
|
|
1020
|
+
// PWA install guide (builtin cert mode, no CA step needed)
|
|
1021
|
+
if (fullUrl === "/pwa" && req.method === "GET") {
|
|
1022
|
+
var host = req.headers.host || "localhost";
|
|
1023
|
+
var hostname = host.split(":")[0];
|
|
1024
|
+
var protocol = tlsOptions ? "https" : "http";
|
|
1025
|
+
var pwaUrl = protocol + "://" + hostname + ":" + portNum;
|
|
1026
|
+
res.writeHead(200, {
|
|
1027
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
1028
|
+
});
|
|
1029
|
+
res.end(setupPageHtml(pwaUrl, pwaUrl, false, true));
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1020
1033
|
// Global push endpoints (used by setup page)
|
|
1021
1034
|
if (req.method === "GET" && fullUrl === "/api/vapid-public-key" && pushModule) {
|
|
1022
1035
|
res.writeHead(200, { "Content-Type": "application/json" });
|