gui: Mask personal data says it turns on Hide accounts too
Turning on Mask personal data in Settings › Privacy also turns on Hide accounts (window.hideAccounts.set), and Hide accounts follows it until it is chosen by hand. That has been so since inaction's report on Discord, but nothing said it, so the accounts blurred on every page with no word why. The row's description now ends "Turning it on turns on Hide accounts as well", in every language. Tests: privacy-hides-accounts now runs in every language (before, en and zh only) and checks the description before the click. Run (mote, at this tree): - privacy-hides-accounts, privacy-model, redact-kinds, provider-mask, settings-search, i18n-keys, gui-de and gui-ja, Chromium and WebKit: 303 pass, 1 red. The red is provider-mask "Hide accounts is one switch on every page", Chromium en 1000, a timeout under the parallel run. It passed 140 of 140 alone, and is filed as #5109. - go test ./internal/gui -run 'TestCoreScriptBudget|TestI18n|TestCSS': ok. Broken by hand, then put back: with the old description in app.js, privacy-hides-accounts was 10 of 10 red. Not tried: the real app.
This commit is contained in:
@@ -22012,7 +22012,7 @@ function renderRedact(s, keep) {
|
||||
onOff(s.redact, (redact) => savePrefs({ ...keep, redact })));
|
||||
if (s.redact) row(t("Keep a key's form"), t("A key goes as a made-up one of the same form (sk_… stays sk_…), not a placeholder, and comes back as it was"),
|
||||
onOff(s.redactShape, (redactShape) => savePrefs({ ...keep, redactShape }))).id = "redactShapeRow";
|
||||
row(t("Mask personal data"), t("Emails, phone numbers, ID and bank card numbers too"),
|
||||
row(t("Mask personal data"), t("Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well"),
|
||||
onOff(s.redactPersonal, (redactPersonal) => {
|
||||
if (redactPersonal) window.hideAccounts?.set(true, true);
|
||||
savePrefs({ ...keep, redactPersonal });
|
||||
|
||||
@@ -1720,7 +1720,7 @@ const I18N = {
|
||||
"Already checked in today: {n}": "今日已签到过:{n}",
|
||||
"Not available yet: {n}": "暂不可签到:{n}",
|
||||
"Check in in its own app: {n}": "需在其自家应用签到:{n}",
|
||||
"Emails, phone numbers, ID and bank card numbers too": "邮箱、手机号、身份证号和银行卡号也一并脱敏",
|
||||
"Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well": "邮箱、手机号、身份证号和银行卡号也一并脱敏。打开时会一并打开「账号打码」",
|
||||
"Social Security numbers": "美国社会安全号",
|
||||
"US SSNs, in the ranges that are given out": "美国 SSN,只认实际会发放的号段",
|
||||
"Passport numbers": "护照号",
|
||||
@@ -7193,7 +7193,7 @@ const I18N = {
|
||||
"Already checked in today: {n}": "今日已簽到過:{n}",
|
||||
"Not available yet: {n}": "暫不可簽到:{n}",
|
||||
"Check in in its own app: {n}": "需在其自家應用程式簽到:{n}",
|
||||
"Emails, phone numbers, ID and bank card numbers too": "郵箱、手機號、身份證號和銀行卡號也一併脫敏",
|
||||
"Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well": "郵箱、手機號、身份證號和銀行卡號也一併脫敏。開啟時會一併開啟「帳號打碼」",
|
||||
"Social Security numbers": "美國社會安全碼",
|
||||
"US SSNs, in the ranges that are given out": "美國 SSN,只認實際會發放的號段",
|
||||
"Passport numbers": "護照號碼",
|
||||
@@ -12628,7 +12628,7 @@ const I18N = {
|
||||
"Already checked in today: {n}": "今日はすでにチェックイン済み:{n}",
|
||||
"Not available yet: {n}": "まだチェックインできません:{n}",
|
||||
"Check in in its own app: {n}": "各サービスのアプリでチェックイン:{n}",
|
||||
"Emails, phone numbers, ID and bank card numbers too": "メールアドレス、電話番号、ID 番号、銀行カード番号もマスクします",
|
||||
"Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well": "メールアドレス、電話番号、ID 番号、銀行カード番号もマスクします。オンにすると「アカウントを隠す」もオンになります",
|
||||
"Social Security numbers": "社会保障番号",
|
||||
"US SSNs, in the ranges that are given out": "米国の SSN。実際に発行される範囲のものだけ",
|
||||
"Passport numbers": "パスポート番号",
|
||||
@@ -18106,7 +18106,7 @@ const I18N = {
|
||||
"Already checked in today: {n}": "Heute bereits eingecheckt: {n}",
|
||||
"Not available yet: {n}": "Noch nicht verfügbar: {n}",
|
||||
"Check in in its own app: {n}": "In der eigenen App einchecken: {n}",
|
||||
"Emails, phone numbers, ID and bank card numbers too": "Auch E-Mail-Adressen, Telefonnummern, Ausweis- und Bankkartennummern",
|
||||
"Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well": "Auch E-Mail-Adressen, Telefonnummern, Ausweis- und Bankkartennummern. Eingeschaltet schaltet es auch „Konten verbergen“ ein",
|
||||
"Social Security numbers": "Sozialversicherungsnummern",
|
||||
"US SSNs, in the ranges that are given out": "US-SSNs, nur in den Bereichen, die vergeben werden",
|
||||
"Passport numbers": "Reisepassnummern",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// accounts is chosen on this computer it follows Mask personal data;
|
||||
// turning Mask personal data on turns it on; and Privacy has the Hide
|
||||
// accounts switch itself. A choice made with the switch is kept over it.
|
||||
// English and Chinese; no backend, the API is faked here.
|
||||
// Mask personal data's description says so. Every language; no backend, the API is faked here.
|
||||
const assert = require("node:assert/strict");
|
||||
const fs = require("node:fs/promises");
|
||||
const path = require("node:path");
|
||||
@@ -39,13 +39,20 @@ function serve(lang, settings, saved) {
|
||||
};
|
||||
}
|
||||
|
||||
// sub: Mask personal data's description, which says it turns Hide accounts on too
|
||||
const words = {
|
||||
en: { personal: "Mask personal data", hide: "Hide accounts", on: "On", off: "Off" },
|
||||
zh: { personal: "脱敏个人信息", hide: "账号打码", on: "开启", off: "关闭" },
|
||||
en: { personal: "Mask personal data", hide: "Hide accounts", on: "On", off: "Off",
|
||||
sub: "Emails, phone numbers, ID and bank card numbers too. Turning it on turns on Hide accounts as well" },
|
||||
zh: { personal: "脱敏个人信息", hide: "账号打码", on: "开启", off: "关闭", sub: "邮箱、手机号、身份证号和银行卡号也一并脱敏。打开时会一并打开「账号打码」" },
|
||||
"zh-TW": { personal: "脫敏個人資訊", hide: "帳號打碼", on: "開啟", off: "關閉", sub: "郵箱、手機號、身份證號和銀行卡號也一併脫敏。開啟時會一併開啟「帳號打碼」" },
|
||||
ja: { personal: "個人情報をマスク", hide: "アカウントを隠す", on: "オン", off: "オフ",
|
||||
sub: "メールアドレス、電話番号、ID 番号、銀行カード番号もマスクします。オンにすると「アカウントを隠す」もオンになります" },
|
||||
de: { personal: "Personenbezogene Daten maskieren", hide: "Konten verbergen", on: "An", off: "Aus",
|
||||
sub: "Auch E-Mail-Adressen, Telefonnummern, Ausweis- und Bankkartennummern. Eingeschaltet schaltet es auch „Konten verbergen“ ein" },
|
||||
};
|
||||
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
for (const lang of ["en", "zh"]) {
|
||||
for (const lang of (process.env.LANGS ? process.env.LANGS.split(",") : Object.keys(words))) {
|
||||
const w = words[lang];
|
||||
test(`${engine} ${lang}: masking personal data hides the accounts on screen`, async (t) => {
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
@@ -97,6 +104,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
page = await open(settings, null, "http://magpie.test/?view=settings&tab=privacy", saved);
|
||||
const row = (name) => page.locator("#setPage-privacy .list .row", { has: page.locator(".name", { hasText: new RegExp("^" + name + "$") }) });
|
||||
await row(w.hide).waitFor();
|
||||
// it says it turns Hide accounts on, before it is clicked
|
||||
assert.equal((await row(w.personal).locator(".sub").textContent()).trim(), w.sub);
|
||||
const top = () => page.evaluate(() => document.querySelector("#view-settings").scrollTop);
|
||||
const y0 = await top();
|
||||
await row(w.personal).getByRole("button", { name: w.on, exact: true }).click();
|
||||
|
||||
Reference in New Issue
Block a user