feat(ui): agent-outdated banner on the NAS settings page (capability gate, Part 3)
- networkStoragePageData threads NetAddSupport (yes/no/unknown) via the short-budget netAddSupport probe (2 s ctx + cache — a down agent cannot stall the page) - storage_network.html: support=no replaces the add form with the Hungarian alert-warning banner; share list + remove render in every state; yes/unknown render the form unchanged; load-time JS guarded for the formless render - T5 render test (banner/no-form on 'no', form on yes/unknown); red-proof RP5 run (conditional dropped → banner assertions fail) and reverted - template_id_gate + emoji_gate green Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
@@ -48,6 +48,13 @@
|
||||
|
||||
<div class="settings-card">
|
||||
<h3>Hálózati tárhely hozzáadása</h3>
|
||||
{{if eq .NetAddSupport "no"}}
|
||||
<!-- Capability gate (agent predates the verify-before-commit add semantics): the add form is
|
||||
withheld; the share list + remove above stay fully usable. -->
|
||||
<div class="alert alert-warning">A rendszer háttérszolgáltatása (ügynök) régebbi verziójú, ezért új
|
||||
hálózati tárhely most nem csatlakoztatható. A frissítés megérkezése után a funkció automatikusan
|
||||
elérhetővé válik — a meglévő megosztások addig is működnek.</div>
|
||||
{{else}}
|
||||
<p class="settings-card-desc">A csatlakoztatás előtt a rendszer ellenőrzi a megosztást: valóban
|
||||
csatolható-e, és tudnak-e írni rá az alkalmazások. Hiba esetén semmi nem marad félkészen beállítva.</p>
|
||||
<form id="ns-add-form" onsubmit="return netStorageAdd(event)">
|
||||
@@ -93,6 +100,7 @@
|
||||
</div>
|
||||
<div id="ns-add-result" style="margin-top:1rem"></div>
|
||||
</form>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
@@ -206,8 +214,7 @@ function netStorageRemove(name,label){
|
||||
}).catch(function(e){ alert('Hiba: '+e); });
|
||||
}});
|
||||
}
|
||||
nsToggleSmb();
|
||||
nsUpdateHostID();
|
||||
if(document.getElementById('ns-add-form')){ nsToggleSmb(); nsUpdateHostID(); } // form absent on the capability banner
|
||||
</script>
|
||||
<div id="dialog-root"></div>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user