From 874eab21dcb9f6f6a94f9b9fb4b14a00c1231ea3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 22:04:36 +0200 Subject: [PATCH] Don't tell an account about 18+ when it hasn't got any MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The child-profile checkbox read "Dětský profil (skryje anime a 18+, na odchod chce PIN)" for everyone. Three of the four accounts are nsfwEnabled = false, so for most of the household that sentence announced a section they have never seen and cannot reach, and it was also untrue: there is no 18+ content on those accounts to hide. The adult source field on the Zdroje tab has always been gated on the same flag. This label was the one place on the page that was not, because it was static markup rather than something rendered from USER. Now set in enter(): "skryje anime" alone, or "skryje anime a 18+" when the account has it. Checked both branches against a clean and an adult test user on a local instance. The app is already clean here: childProfileDesc is only "K opuštění tohoto profilu je potřeba PIN", and every 18+ string in app_cs.arb lives inside the adult section itself, which a clean build does not contain. Co-Authored-By: Claude Opus 5 --- pb_public/index.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pb_public/index.html b/pb_public/index.html index 6aa9cb5..d4f4c3b 100644 --- a/pb_public/index.html +++ b/pb_public/index.html @@ -186,8 +186,9 @@
- + +
@@ -546,6 +547,16 @@ async function enter(){ loadProviders(), loadConfigList()]); $("acEmail").value=(USER&&USER.email)||""; $("acRating").value=(USER&&USER.ratingDefault)||"unrestricted"; + // **Do not mention 18+ to an account that does not have it.** This label used to + // read "skryje anime a 18+" for everyone, which told most of the household that a + // section they have never seen and cannot reach exists at all. Three of the four + // accounts are `nsfwEnabled = false`, and for them the sentence was also simply + // untrue: there is no 18+ content to hide. The adult source field on the Zdroje + // tab has always been gated on the same flag; this label was the one place that + // was not. + $("pfChildLabel").textContent = (USER && USER.nsfwEnabled) + ? "Dětský profil (skryje anime a 18+, na odchod chce PIN)" + : "Dětský profil (skryje anime, na odchod chce PIN)"; renderAddonGate(); renderStart(); // An explicit #hash always wins — a bookmark or a link must land where it says.