controller: zero-toggle honesty — a configured+escrowed offbox with no app selected shows 'Nincs távoli mentésre jelölt alkalmazás…' on the toggle list, and a zero-toggle run reports 'Sikeres — nincs mentésre jelölt alkalmazás' instead of bare success

Claude-Session: https://claude.ai/code/session_01GzammAMzsJTgpQHqxwM2bC
This commit is contained in:
2026-07-13 08:27:52 +02:00
parent a00afcc79d
commit b482860c03
4 changed files with 57 additions and 1 deletions
+11 -1
View File
@@ -671,7 +671,17 @@ func (s *Server) backupsHandler(w http.ResponseWriter, r *http.Request) {
offboxTgt := s.settings.GetOffboxTarget()
data["Offbox"] = offboxTgt
data["OffboxConfigured"] = s.backupMgr.OffboxConfigured()
data["OffboxApps"] = s.buildOffboxApps()
offboxApps := s.buildOffboxApps()
data["OffboxApps"] = offboxApps
// Zero-toggle hint (take-two obs.): configured + escrowed but no app selected — nothing is
// actually covered by the offsite leg until the customer toggles at least one.
offboxToggled := 0
for _, a := range offboxApps {
if a.Enabled {
offboxToggled++
}
}
data["OffboxToggledCount"] = offboxToggled
// SLICE 4 soft-quota usage bar (rendered only when a quota is set — shared model).
data["OffboxQuotaPct"] = backup.OffboxQuotaPercent(offboxTgt)
} else {
@@ -169,6 +169,9 @@
</form>
</div>
<h4 style="margin-top:1.25rem">Mely alkalmazások mentődnek a távoli tárolóra?</h4>
{{if and .OffboxApps (eq .Offbox.EscrowState "escrowed") (eq .OffboxToggledCount 0)}}
<p class="form-hint">Nincs távoli mentésre jelölt alkalmazás — jelölj ki legalább egyet.</p>
{{end}}
{{if .OffboxApps}}
<div class="storage-paths-list">
{{range .OffboxApps}}