dns ui: keep defaults visible and apply active set workflow

This commit is contained in:
beckline
2026-02-22 19:52:47 +03:00
parent 0f88cfeeaa
commit 89eaaf3f23
2 changed files with 37 additions and 13 deletions

View File

@@ -739,13 +739,16 @@ RU: Источник wildcard IP: резолвер, runtime nftset SmartDNS, и
total += 1
if bool(getattr(item, "enabled", False)):
active.append(addr)
applied = len(active)
if applied > 12:
applied = 12
if not active:
text = f"Resolver upstreams: active=0/{total} (empty set)"
else:
preview = ", ".join(active[:4])
if len(active) > 4:
preview += f", +{len(active)-4} more"
text = f"Resolver upstreams: active={len(active)}/{total} [{preview}]"
text = f"Resolver upstreams: active={len(active)}/{total}, applied={applied}/12 [{preview}]"
self.lbl_dns_resolver_upstreams.setText(text)
self.lbl_dns_resolver_upstreams.setStyleSheet("color: gray;")