Add Install Commands card: copy-to-clipboard JARVIS agent + FusionPBX installer one-liners

Both are plain text buttons (not links) so they never navigate/click through, just copy to clipboard. JARVIS command intentionally omits the registration key (site is password-protected, but kept the same interactive-prompt pattern used for the public install scripts anyway) -- it prompts for the key when run.
This commit is contained in:
Claude
2026-07-08 15:31:20 -05:00
parent 041a3aa080
commit 5242cd8867
+53
View File
@@ -128,6 +128,31 @@
} }
.link-item:hover .arrow { opacity: 1; } .link-item:hover .arrow { opacity: 1; }
.copy-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.6rem 1rem;
color: var(--text);
font-size: 0.9rem;
transition: background 0.15s;
cursor: pointer;
border: none;
background: none;
width: 100%;
text-align: left;
font-family: inherit;
}
.copy-item:hover { background: var(--surface2); }
.copy-item .copy-icon {
color: var(--muted);
font-size: 0.7rem;
opacity: 0;
transition: opacity 0.15s;
flex-shrink: 0;
}
.copy-item:hover .copy-icon { opacity: 1; }
.dot-blue { background: var(--accent); } .dot-blue { background: var(--accent); }
.dot-purple { background: var(--accent2); } .dot-purple { background: var(--accent2); }
.dot-green { background: var(--green); } .dot-green { background: var(--green); }
@@ -220,6 +245,22 @@
</div> </div>
</div> </div>
<!-- INSTALL COMMANDS (copy to clipboard, not clickable links) -->
<div class="card">
<div class="card-header">
<div class="icon icon-cyan">📋</div>
<h2>Install Commands</h2>
</div>
<div class="links">
<button type="button" class="copy-item" onclick="copyCmd(this, 'curl -sSL http://jarvis.orbishosting.com/agent/install.sh | bash -s -- $(hostname) linux')">
<span class="dot dot-orange"></span><span class="name">JARVIS Agent</span><span class="sub">Linux install one-liner &mdash; prompts for registration key, run as root</span><span class="copy-icon">copy</span>
</button>
<button type="button" class="copy-item" onclick="copyCmd(this, 'apt update &amp;&amp; apt install -y git &amp;&amp; git clone https://github.com/fusionpbx/fusionpbx-install.sh.git &amp;&amp; cd fusionpbx-install.sh/debian &amp;&amp; ./install.sh')">
<span class="dot dot-purple"></span><span class="name">FusionPBX Full Installer</span><span class="sub">Official latest-version install script &mdash; Debian 12, run as root</span><span class="copy-icon">copy</span>
</button>
</div>
</div>
<!-- BACKUP STATUS --> <!-- BACKUP STATUS -->
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
@@ -701,6 +742,18 @@
} }
tick(); setInterval(tick, 1000); tick(); setInterval(tick, 1000);
// ── Install Commands card: copy-to-clipboard, never auto-navigates ──
function copyCmd(btn, text) {
navigator.clipboard.writeText(text).then(() => {
const iconEl = btn.querySelector('.copy-icon');
const prev = iconEl.textContent;
iconEl.textContent = 'copied!';
iconEl.style.opacity = '1';
setTimeout(() => { iconEl.textContent = prev; iconEl.style.opacity = ''; }, 1500);
});
}
// ── Backup Status card — reads daily-refreshed JSON from MSP360 collector ── // ── Backup Status card — reads daily-refreshed JSON from MSP360 collector ──
async function loadBackupStatus() { async function loadBackupStatus() {
const el = document.getElementById('backup-status-list'); const el = document.getElementById('backup-status-list');