Add animated spinner to MCP add button loading state
Shows loading-spinner animation alongside "Adding..." text while waiting for MCP server addition to complete. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
4dce901166
commit
d3231fcb15
|
|
@ -1133,8 +1133,8 @@ addMcpBtn?.addEventListener("click", async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show loading state
|
// Show loading state
|
||||||
const originalText = addMcpBtn.textContent;
|
const originalText = addMcpBtn.innerHTML;
|
||||||
addMcpBtn.textContent = "Adding...";
|
addMcpBtn.innerHTML = '<span class="loading-spinner"></span> Adding...';
|
||||||
addMcpBtn.disabled = true;
|
addMcpBtn.disabled = true;
|
||||||
addMcpBtn.classList.add("opacity-50", "cursor-not-allowed");
|
addMcpBtn.classList.add("opacity-50", "cursor-not-allowed");
|
||||||
|
|
||||||
|
|
@ -1147,7 +1147,7 @@ addMcpBtn?.addEventListener("click", async () => {
|
||||||
alert(`Failed to add server: ${error}`);
|
alert(`Failed to add server: ${error}`);
|
||||||
} finally {
|
} finally {
|
||||||
// Reset button state
|
// Reset button state
|
||||||
addMcpBtn.textContent = originalText;
|
addMcpBtn.innerHTML = originalText;
|
||||||
addMcpBtn.disabled = false;
|
addMcpBtn.disabled = false;
|
||||||
addMcpBtn.classList.remove("opacity-50", "cursor-not-allowed");
|
addMcpBtn.classList.remove("opacity-50", "cursor-not-allowed");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue