Remove redundant Scripts dir field from Scheduler tab

VaraverkSettings.page (Settings → Other Settings) now owns SCRIPTS_DIR.
The inline Advanced-mode field and vvSaveSettings() in the Scheduler tab
were a second path to the same write — removed.
This commit is contained in:
Gmer4Lfe
2026-05-30 14:06:28 -04:00
parent e6a0ab8e64
commit 26f3778786
-22
View File
@@ -416,18 +416,6 @@ $runningScripts = array_unique($runningScripts);
style="display:none;margin-left:auto;">&#8635; Git Pull</button>
</div>
<!-- Plugin settings row (Advanced mode only) -->
<div class="vv-nb-settings vv-adv-only" style="display:none">
<span style="color:#555;font-size:11px;white-space:nowrap;">Scripts dir:</span>
<input type="text" id="vv-scripts-dir" value="<?= htmlspecialchars(SCRIPTS_DIR) ?>"
style="flex:1;min-width:180px;background:#111;border:1px solid #333;color:#aaa;
padding:2px 6px;border-radius:3px;font-family:monospace;font-size:11px;">
<button type="button" onclick="vvSaveSettings()"
style="padding:2px 10px;background:#252525;border:1px solid #444;color:#aaa;
border-radius:3px;cursor:pointer;font-size:11px;white-space:nowrap;">Save</button>
<span id="vv-settings-status" style="font-size:11px;color:#666;"></span>
</div>
<!-- ── How do I use this (pinned) ── -->
<div class="vv-sug-block vv-info-block" id="vv-how-to-use" data-save-key="how-to-use">
<div class="vv-sug-header" onclick="vvToggleSug(this)">
@@ -966,16 +954,6 @@ function vvPost(url, data) {
}).then(r => r.json());
}
function vvSaveSettings() {
const dir = document.getElementById('vv-scripts-dir').value.trim();
const status = document.getElementById('vv-settings-status');
if (!dir) { status.textContent = '✗ Path required'; return; }
status.textContent = 'Saving…';
vvPost('/plugins/varaverk/api/settings.php', {scripts_dir: dir})
.then(d => { status.textContent = d.ok ? '✓ Saved — reload to apply' : '✗ ' + (d.error ?? 'Error'); })
.catch(() => { status.textContent = '✗ Request failed'; });
}
function vvFitRight() {
const right = document.getElementById('vv-sched-right');
if (!right.classList.contains('vv-panel-visible')) return;