Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/ops/git/systemd/fcgiwrap@cgit.socket.d
diff options
context:
space:
mode:
authorLeitwolf112026-11-17 14:33:32 +0300
committerLeitwolf112026-11-17 14:33:32 +0300
commit6d78305900851f98e00cc1b688d1237b5e33f857 (patch)
tree4446e18e2437eb8bf3b841c6df2cac650063dd7a /ops/git/systemd/fcgiwrap@cgit.socket.d
parent477625cd75db2295d0f05bce206d9ea1b5b13ef2 (diff)
downloadprogmaweb-6d78305900851f98e00cc1b688d1237b5e33f857.tar.gz
Share the theme and the language across every Progmasoft host
A theme chosen on progmasoft.com did not hold on account., viget., product. or console., and a language choice sometimes did not either: - The theme lived in localStorage, which each host keeps for itself. It is now the cookie progmasoft_theme of .progmasoft.com, as the language is (lib/theme.ts): "light" or "dark", a year, SameSite=Lax, Secure over HTTPS, readable by the page's scripts. The bootstrap that sets the theme before the first paint reads the cookie; a choice an earlier version left in localStorage moves into the cookie once. The theme control writes the cookie and reads it again when a page is shown or comes back into view, so a tab left open follows a choice made on another host. - The language cookie is shared (Domain=.progmasoft.com), but a cookie of the same name that one host kept from before shadowed it: the browser sends both, the host's first. The proxy now expires such a host cookie (lib/shared-cookies.ts) for the language and the theme alike, so the shared choice holds from the next request on. Tests: unit tests for the cookie, the bootstrap (run in a vm with a fake document) and the expiry of shadowing cookies (54 in all); layout tests that choose a theme and a language on progmasoft.com and find them on the other hosts, move an old localStorage theme, and clear a shadowing cookie (144 layout tests pass); tsc, eslint and build pass. Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
Diffstat (limited to 'ops/git/systemd/fcgiwrap@cgit.socket.d')
0 files changed, 0 insertions, 0 deletions