Setup mode: HOST1 lands on Partnership with Onboard highlighted
scheduler.php: after host1.conf save in setup mode, redirect to ?tab=partnership&vv_onboard=1 instead of Monitor. HOST2+ still redirects to Monitor (they don't manage the partnership). partnership.php: detects vv_onboard=1 URL param after actions render. Adds pulse animation + box-shadow to the Onboard button and scrolls it into view. One-shot — gone when user navigates away.
This commit is contained in:
@@ -24,6 +24,14 @@
|
|||||||
.vv-pt-action-btn.info { background:#1a2a3a; color:#7ab; border:1px solid #2e4a6b; }
|
.vv-pt-action-btn.info { background:#1a2a3a; color:#7ab; border:1px solid #2e4a6b; }
|
||||||
.vv-pt-action-btn:disabled { opacity:0.4; cursor:default; }
|
.vv-pt-action-btn:disabled { opacity:0.4; cursor:default; }
|
||||||
.vv-pt-transfer-note { font-size:10px; color:#555; margin-top:6px; font-family:monospace; }
|
.vv-pt-transfer-note { font-size:10px; color:#555; margin-top:6px; font-family:monospace; }
|
||||||
|
.vv-pt-onboard-highlight {
|
||||||
|
box-shadow: 0 0 0 2px #4a8, 0 0 12px rgba(100,200,120,.25) !important;
|
||||||
|
animation: vvOnboardPulse 1.4s ease-in-out 4;
|
||||||
|
}
|
||||||
|
@keyframes vvOnboardPulse {
|
||||||
|
0%,100% { box-shadow: 0 0 0 2px #4a8, 0 0 8px rgba(100,200,120,.2); }
|
||||||
|
50% { box-shadow: 0 0 0 4px #4a8, 0 0 18px rgba(100,200,120,.45); }
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 2px;">
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 2px;">
|
||||||
@@ -249,6 +257,15 @@ function _render(data) {
|
|||||||
// Actions
|
// Actions
|
||||||
document.getElementById('vv-pt-actions-body').innerHTML = _renderActions(nodes, cfg);
|
document.getElementById('vv-pt-actions-body').innerHTML = _renderActions(nodes, cfg);
|
||||||
|
|
||||||
|
// Highlight Onboard button when arriving from first-run wizard
|
||||||
|
if (new URLSearchParams(location.search).get('vv_onboard') === '1') {
|
||||||
|
const onboardBtn = document.querySelector('#vv-pt-actions-body .vv-pt-action-btn.run');
|
||||||
|
if (onboardBtn) {
|
||||||
|
onboardBtn.classList.add('vv-pt-onboard-highlight');
|
||||||
|
setTimeout(() => onboardBtn.scrollIntoView({behavior: 'smooth', block: 'center'}), 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Timestamp
|
// Timestamp
|
||||||
const ts = data.ts ? new Date(data.ts * 1000).toLocaleString([],
|
const ts = data.ts ? new Date(data.ts * 1000).toLocaleString([],
|
||||||
{month:'numeric',day:'numeric',year:'numeric',hour:'2-digit',minute:'2-digit',second:'2-digit'}) : '';
|
{month:'numeric',day:'numeric',year:'numeric',hour:'2-digit',minute:'2-digit',second:'2-digit'}) : '';
|
||||||
|
|||||||
@@ -2627,9 +2627,16 @@ function vvSaveRawConf() {
|
|||||||
setTimeout(() => vvLoadRawConf(vvLocalHostConf), 400);
|
setTimeout(() => vvLoadRawConf(vvLocalHostConf), 400);
|
||||||
} else {
|
} else {
|
||||||
// Host conf saved → setup complete
|
// Host conf saved → setup complete
|
||||||
btn.textContent = '✓ Setup complete — loading plugin…';
|
|
||||||
vvSetupConf = '';
|
vvSetupConf = '';
|
||||||
setTimeout(() => { window.location.href = location.pathname + '?tab=monitor'; }, 800);
|
if (vvLocalHostConf === 'host1.conf') {
|
||||||
|
// HOST1: drive the partnership next
|
||||||
|
btn.textContent = '✓ Done — opening Partnership…';
|
||||||
|
setTimeout(() => { window.location.href = location.pathname + '?tab=partnership&vv_onboard=1'; }, 800);
|
||||||
|
} else {
|
||||||
|
// HOST2+: go to Monitor, HOST1 manages the partnership
|
||||||
|
btn.textContent = '✓ Setup complete — loading plugin…';
|
||||||
|
setTimeout(() => { window.location.href = location.pathname + '?tab=monitor'; }, 800);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user