Fix external-link warning on tab navigation
Tab links use relative query-string hrefs (?tab=scheduler), which fail every check in Unraid's global external-link click-guard (BodyInlineJS.php): not a valid absolute URL, doesn't start with "/", doesn't match a registered plugin page basename. Confirmed live — the guard's dom.hostname ends up undefined for these, matching the reported "Always Allow undefined" dialog text exactly. Fix: add class="localURL", the same escape hatch dynamix's own pages (ManagementAccess.page) use for this exact situation. Applied to the main tab bar and the setup wizard's checklist action links (?tab=partnership).
This commit is contained in:
@@ -36,7 +36,7 @@ $tabLabels = ['monitor' => 'Monitor', 'scheduler' => 'Scheduler', 'docker' => 'D
|
|||||||
<!-- Tab bar -->
|
<!-- Tab bar -->
|
||||||
<div id="vv-tabs">
|
<div id="vv-tabs">
|
||||||
<?php foreach ($validTabs as $t): ?>
|
<?php foreach ($validTabs as $t): ?>
|
||||||
<a href="?tab=<?=$t?>" class="vv-tab<?= $t === $tab ? ' active' : '' ?>">
|
<a href="?tab=<?=$t?>" class="localURL vv-tab<?= $t === $tab ? ' active' : '' ?>">
|
||||||
<?= $tabLabels[$t] ?? ucfirst($t) ?>
|
<?= $tabLabels[$t] ?? ucfirst($t) ?>
|
||||||
</a>
|
</a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ function vvLoadChecklist() {
|
|||||||
const lbl = vvActionLabels[item.action] || item.action;
|
const lbl = vvActionLabels[item.action] || item.action;
|
||||||
const href = vvActionHref[item.action];
|
const href = vvActionHref[item.action];
|
||||||
if (href) {
|
if (href) {
|
||||||
act = `<div class="vv-cl-act"><a href="${href}" style="font-size:11px;color:#556;">${lbl}</a></div>`;
|
act = `<div class="vv-cl-act"><a href="${href}" class="localURL" style="font-size:11px;color:#556;">${lbl}</a></div>`;
|
||||||
} else if (item.action === 'create_key') {
|
} else if (item.action === 'create_key') {
|
||||||
act = `<div class="vv-cl-act"><button onclick="vvCreateKey(this)">${lbl}</button></div>`;
|
act = `<div class="vv-cl-act"><button onclick="vvCreateKey(this)">${lbl}</button></div>`;
|
||||||
} else if (item.action === 'run_populate') {
|
} else if (item.action === 'run_populate') {
|
||||||
|
|||||||
Reference in New Issue
Block a user