update readme and fix some smaller things for mac
This commit is contained in:
@@ -198,7 +198,7 @@ function applyMenuSupportRules(clientId) {
|
||||
|
||||
const elevateBtn = menu.querySelector('[data-action="elevate"]');
|
||||
if (elevateBtn) {
|
||||
elevateBtn.style.display = platform === "darwin" ? "" : "none";
|
||||
elevateBtn.style.display = platform === "mac" ? "" : "none";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -954,6 +954,10 @@ menu.addEventListener("click", async (e) => {
|
||||
const data = await res.json().catch(() => ({}));
|
||||
if (data.ok) {
|
||||
alert(data.message || "Elevation successful — client will reconnect as root.");
|
||||
// Stagger thumbnail requests to catch the client after it reconnects
|
||||
setTimeout(() => requestThumbnail(contextCard), 5000);
|
||||
setTimeout(() => requestThumbnail(contextCard), 10000);
|
||||
setTimeout(() => requestThumbnail(contextCard), 18000);
|
||||
} else {
|
||||
alert(data.error || data.message || "Elevation failed.");
|
||||
}
|
||||
@@ -961,7 +965,7 @@ menu.addEventListener("click", async (e) => {
|
||||
alert("Elevation request failed: " + err.message);
|
||||
}
|
||||
closeMenu(clearContext);
|
||||
setTimeout(() => loadWithOptions({ force: true }), 2000);
|
||||
setTimeout(() => loadWithOptions({ force: true }), 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
let clipboardSyncTimer = null;
|
||||
let lastClipboardText = "";
|
||||
let clipboardSyncActive = false;
|
||||
let elevationPending = false;
|
||||
|
||||
function resetH264RuntimeState() {
|
||||
h264TimestampUs = 0;
|
||||
@@ -269,6 +270,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
offlineTimer = setTimeout(() => {
|
||||
const now = performance.now();
|
||||
if (!lastFrameAt || now - lastFrameAt > 3000) {
|
||||
if (elevationPending) return;
|
||||
desiredStreaming = false;
|
||||
setStreamState("offline", reason || "Client offline");
|
||||
}
|
||||
@@ -302,6 +304,10 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
}
|
||||
if (msg.status === "online") {
|
||||
clearOfflineTimer();
|
||||
if (elevationPending) {
|
||||
elevationPending = false;
|
||||
desiredStreaming = true;
|
||||
}
|
||||
if (desiredStreaming) {
|
||||
setStreamState("starting", "Reconnecting");
|
||||
if (displaySelect && displaySelect.value !== undefined) {
|
||||
@@ -395,7 +401,8 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
statusDiv.className = "text-xs text-emerald-400";
|
||||
}
|
||||
elevateBtn.textContent = "Done";
|
||||
// The client will disconnect and reconnect; the viewer should auto-recover
|
||||
elevationPending = true;
|
||||
desiredStreaming = true;
|
||||
} else {
|
||||
if (statusDiv) {
|
||||
statusDiv.textContent = `Elevation failed: ${data.message || "Unknown error"}`;
|
||||
|
||||
@@ -22,6 +22,8 @@ Hello, I made this project for fun.
|
||||
|
||||
If you just want it running fast, use this.
|
||||
|
||||
> **⚠️ The compose file below is for Linux ONLY.** If you are on **Windows** or **macOS**, use `docker-compose.windows.yml` instead. See [Docker Install By OS](#docker-install-by-os) for the correct commands.
|
||||
|
||||
1. Create a `docker-compose.yml` file and paste this:
|
||||
|
||||
```yaml
|
||||
@@ -235,6 +237,20 @@ docker --version
|
||||
docker compose version
|
||||
```
|
||||
|
||||
> **macOS users:** use `docker-compose.windows.yml` instead of the default `docker-compose.yml`. The Windows/macOS compose file is pre-configured for Docker Desktop (no `network_mode: host`, correct volume paths, etc.).
|
||||
|
||||
Clone the repo or download the files, then run:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.windows.yml up -d
|
||||
```
|
||||
|
||||
To rebuild after an update:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.windows.yml up --build -d
|
||||
```
|
||||
|
||||
## No Docker (.bat / .sh)
|
||||
|
||||
If you do not want Docker, use the included scripts.
|
||||
|
||||
Reference in New Issue
Block a user