enable CGO by default now.
This commit is contained in:
@@ -235,9 +235,15 @@ async function startBuild(config) {
|
||||
"info",
|
||||
);
|
||||
|
||||
await streamBuildOutput(buildId);
|
||||
await streamBuildOutput(buildId, config);
|
||||
} catch (err) {
|
||||
addBuildOutput(`\nERROR: ${err.message}\n`, "error");
|
||||
if (!config.disableCgo) {
|
||||
addBuildOutput(
|
||||
"Hint: This build used CGO. If it keeps failing, try enabling the 'Disable CGO' option and build again.\n",
|
||||
"warn",
|
||||
);
|
||||
}
|
||||
buildStatusText.textContent = "Build failed";
|
||||
buildStatus.querySelector("div").className =
|
||||
"flex items-center gap-2 p-3 rounded-lg bg-red-900/40 border border-red-700/60";
|
||||
@@ -250,7 +256,7 @@ async function startBuild(config) {
|
||||
}
|
||||
}
|
||||
|
||||
async function streamBuildOutput(buildId) {
|
||||
async function streamBuildOutput(buildId, config = {}) {
|
||||
const res = await fetch(`/api/build/${buildId}/stream`, {
|
||||
credentials: "include",
|
||||
});
|
||||
@@ -295,6 +301,13 @@ async function streamBuildOutput(buildId) {
|
||||
? "fa-solid fa-circle-check"
|
||||
: "fa-solid fa-circle-xmark";
|
||||
|
||||
if (!data.success && !config.disableCgo) {
|
||||
addBuildOutput(
|
||||
"Hint: This build used CGO. If it keeps failing, try enabling the 'Disable CGO' option and build again.\n",
|
||||
"warn",
|
||||
);
|
||||
}
|
||||
|
||||
if (data.success && data.files) {
|
||||
const buildData = {
|
||||
id: data.buildId,
|
||||
|
||||
@@ -443,6 +443,27 @@ bulkUninstallBtn?.addEventListener("click", async () => {
|
||||
window.toggleClientSelection = toggleClientSelection;
|
||||
window.isClientSelected = (clientId) => selectedClients.has(clientId);
|
||||
window.syncClientSelection = syncSelectionState;
|
||||
window.removeClientFromDashboard = async (clientId) => {
|
||||
if (!clientId) return false;
|
||||
try {
|
||||
const res = await fetch(`/api/clients/${clientId}`, {
|
||||
method: "DELETE",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
if (!res.ok) {
|
||||
const data = await res.json().catch(() => ({}));
|
||||
alert(data.error || "Failed to remove client from dashboard");
|
||||
return false;
|
||||
}
|
||||
selectedClients.delete(clientId);
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
alert("Failed to remove client from dashboard");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
window.banClient = async (clientId) => {
|
||||
if (!clientId) return;
|
||||
if (!confirm(`Ban IP for ${clientId} and block future connections?`)) return;
|
||||
@@ -578,6 +599,23 @@ menu.addEventListener("click", async (e) => {
|
||||
closeMenu(clearContext);
|
||||
return;
|
||||
}
|
||||
} else if (action === "remove-dashboard") {
|
||||
if (
|
||||
!confirm(
|
||||
`Remove ${contextCard} from the dashboard list?\n\nUse this for stale clients that are already gone. If that client reconnects later, it will appear again.`,
|
||||
)
|
||||
) {
|
||||
closeMenu(clearContext);
|
||||
return;
|
||||
}
|
||||
|
||||
const removed = await window.removeClientFromDashboard(contextCard);
|
||||
if (removed) {
|
||||
updateBulkToolbar();
|
||||
setTimeout(() => loadWithOptions({ force: true }), 200);
|
||||
}
|
||||
closeMenu(clearContext);
|
||||
return;
|
||||
}
|
||||
|
||||
const ok = await sendCommand(contextCard, action);
|
||||
|
||||
@@ -17,6 +17,7 @@ menu.innerHTML = `
|
||||
<button class="w-full text-left px-3 py-2.5 mb-1 rounded-lg border border-slate-800 bg-slate-800/60 hover:bg-slate-700 flex items-center gap-2" data-action="reconnect"><i class="fa-solid fa-rotate"></i> Reconnect</button>
|
||||
<button class="w-full text-left px-3 py-2.5 mb-1 rounded-lg border border-red-800 bg-red-900/40 hover:bg-red-800/60 text-red-100 flex items-center gap-2" data-action="disconnect"><i class="fa-solid fa-plug-circle-xmark"></i> Disconnect</button>
|
||||
<button class="w-full text-left px-3 py-2.5 rounded-lg border border-red-900 bg-red-950/60 hover:bg-red-900/80 text-red-200 flex items-center gap-2" data-action="uninstall"><i class="fa-solid fa-trash"></i> Uninstall</button>
|
||||
<button class="w-full mt-1 text-left px-3 py-2.5 rounded-lg border border-rose-900 bg-rose-950/70 hover:bg-rose-900/90 text-rose-200 flex items-center gap-2" data-action="remove-dashboard"><i class="fa-solid fa-user-xmark"></i> Remove From Dashboard</button>
|
||||
<div id="plugin-section" class="hidden">
|
||||
<div class="border-t border-slate-700 my-2"></div>
|
||||
<div class="text-[11px] uppercase tracking-wider text-slate-400 px-1 mb-1">Plugins</div>
|
||||
|
||||
Reference in New Issue
Block a user