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"]');
|
const elevateBtn = menu.querySelector('[data-action="elevate"]');
|
||||||
if (elevateBtn) {
|
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(() => ({}));
|
const data = await res.json().catch(() => ({}));
|
||||||
if (data.ok) {
|
if (data.ok) {
|
||||||
alert(data.message || "Elevation successful — client will reconnect as root.");
|
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 {
|
} else {
|
||||||
alert(data.error || data.message || "Elevation failed.");
|
alert(data.error || data.message || "Elevation failed.");
|
||||||
}
|
}
|
||||||
@@ -961,7 +965,7 @@ menu.addEventListener("click", async (e) => {
|
|||||||
alert("Elevation request failed: " + err.message);
|
alert("Elevation request failed: " + err.message);
|
||||||
}
|
}
|
||||||
closeMenu(clearContext);
|
closeMenu(clearContext);
|
||||||
setTimeout(() => loadWithOptions({ force: true }), 2000);
|
setTimeout(() => loadWithOptions({ force: true }), 5000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
|||||||
let clipboardSyncTimer = null;
|
let clipboardSyncTimer = null;
|
||||||
let lastClipboardText = "";
|
let lastClipboardText = "";
|
||||||
let clipboardSyncActive = false;
|
let clipboardSyncActive = false;
|
||||||
|
let elevationPending = false;
|
||||||
|
|
||||||
function resetH264RuntimeState() {
|
function resetH264RuntimeState() {
|
||||||
h264TimestampUs = 0;
|
h264TimestampUs = 0;
|
||||||
@@ -269,6 +270,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
|||||||
offlineTimer = setTimeout(() => {
|
offlineTimer = setTimeout(() => {
|
||||||
const now = performance.now();
|
const now = performance.now();
|
||||||
if (!lastFrameAt || now - lastFrameAt > 3000) {
|
if (!lastFrameAt || now - lastFrameAt > 3000) {
|
||||||
|
if (elevationPending) return;
|
||||||
desiredStreaming = false;
|
desiredStreaming = false;
|
||||||
setStreamState("offline", reason || "Client offline");
|
setStreamState("offline", reason || "Client offline");
|
||||||
}
|
}
|
||||||
@@ -302,6 +304,10 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
|||||||
}
|
}
|
||||||
if (msg.status === "online") {
|
if (msg.status === "online") {
|
||||||
clearOfflineTimer();
|
clearOfflineTimer();
|
||||||
|
if (elevationPending) {
|
||||||
|
elevationPending = false;
|
||||||
|
desiredStreaming = true;
|
||||||
|
}
|
||||||
if (desiredStreaming) {
|
if (desiredStreaming) {
|
||||||
setStreamState("starting", "Reconnecting");
|
setStreamState("starting", "Reconnecting");
|
||||||
if (displaySelect && displaySelect.value !== undefined) {
|
if (displaySelect && displaySelect.value !== undefined) {
|
||||||
@@ -395,7 +401,8 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
|||||||
statusDiv.className = "text-xs text-emerald-400";
|
statusDiv.className = "text-xs text-emerald-400";
|
||||||
}
|
}
|
||||||
elevateBtn.textContent = "Done";
|
elevateBtn.textContent = "Done";
|
||||||
// The client will disconnect and reconnect; the viewer should auto-recover
|
elevationPending = true;
|
||||||
|
desiredStreaming = true;
|
||||||
} else {
|
} else {
|
||||||
if (statusDiv) {
|
if (statusDiv) {
|
||||||
statusDiv.textContent = `Elevation failed: ${data.message || "Unknown error"}`;
|
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.
|
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:
|
1. Create a `docker-compose.yml` file and paste this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -235,6 +237,20 @@ docker --version
|
|||||||
docker compose 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)
|
## No Docker (.bat / .sh)
|
||||||
|
|
||||||
If you do not want Docker, use the included scripts.
|
If you do not want Docker, use the included scripts.
|
||||||
|
|||||||
Reference in New Issue
Block a user