Skip the key step when SSH already works, and read the install path live on both sides

This commit is contained in:
Gmer4Lfe
2026-08-17 07:04:46 -04:00
parent 7e7d845f61
commit d8e3c09b57
4 changed files with 60 additions and 33 deletions
+10 -1
View File
@@ -626,6 +626,11 @@ async function vvPtSaveSettings(btn) {
// ── Private page logic ─────────────────────────────────────────────────────────
(function() {
// Resolve the install path once, up front, and redraw when it lands. termCmd is built
// synchronously inside _renderActions, so without this the first paint would use the
// render-time fallback — right on a flash host, wrong on one that moved to appdata.
vvScriptsDir(<?= json_encode(SCRIPTS_DIR) ?>).then(() => { if (_vvPtReload) _vvPtReload(); });
// ── Helpers ───────────────────────────────────────────────────────────────────
function _row(lbl, val) {
@@ -950,7 +955,11 @@ function _renderActions(nodes, cfg) {
const remotes = nodes.filter(n => !n.is_me);
const hasPartner = remotes.some(n => n.hostname);
const termBase = `https://${window.location.hostname}/webterminal/ttyd/`;
const termCmd = `bash <?= SCRIPTS_DIR ?>/Partnership/partnership_onboard.sh --phase1-only`;
// _vvScriptsDir is filled by the live probe below and falls back to the render-time value.
// Both matter: a host in appdata must be handed its appdata path, and this panel is rendered
// on whichever side is the mirror — so it cannot assume either layout. The owner and the
// mirror are independently either flash or appdata.
const termCmd = `bash ${_vvScriptsDir || <?= json_encode(SCRIPTS_DIR) ?>}/Partnership/partnership_onboard.sh --phase1-only`;
let html = '';