From 9cf218cf19a70bcf30e975185aab48b987c804b9 Mon Sep 17 00:00:00 2001 From: NiallJoeMaher Date: Mon, 23 Nov 2026 12:31:15 +0000 Subject: [PATCH] Report a List shared with you, and iPad keys that step aside for a sheet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A List someone shared with you had Leave and nothing else. It now has Report, in the app (iOS's own alert, the public page's eight reasons) and on the web's shared page (the public page's form). The report goes to the same person who reads the public pages' reports, and only someone the List is shared with can make one; a few a day per account. On an iPad with a keyboard, the single-letter keys, the arrows and ⌘V stayed live while a sheet was open: T opened the tag sheet, and a tag name typed before tapping its field archived the Item underneath on its "e". They now step aside while a sheet or a modal is up, as they do while a field is being edited. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01Chg7BD2Sf1yNRFCX24or7B Signed-off-by: NiallJoeMaher --- apps/ios/app/shared/[id].tsx | 24 +++++++++++++++---- apps/ios/components/split/Shortcuts.tsx | 13 +++++++--- .../app/api/v1/shared/[id]/report/route.ts | 10 ++++++++ apps/web/app/p/[handle]/[slug]/ReportLink.tsx | 8 ++++--- apps/web/app/shared/[id]/page.tsx | 2 ++ apps/web/lib/library/sharing.ts | 15 ++++++++++++ docs/ios.md | 1 + e2e/lists.spec.ts | 6 +++++ packages/db/src/collections.ts | 3 ++- packages/db/src/index.ts | 2 +- packages/db/src/public.test.ts | 19 ++++++++++++++- packages/db/src/shares.ts | 17 ++++++++++++- packages/i18n/messages/ios/de.json | 13 ++++++++++ packages/i18n/messages/ios/en.json | 13 ++++++++++ packages/i18n/messages/ios/es.json | 13 ++++++++++ packages/i18n/messages/ios/fr.json | 13 ++++++++++ packages/i18n/messages/ios/it.json | 13 ++++++++++ packages/i18n/messages/ios/ja.json | 13 ++++++++++ packages/i18n/messages/ios/ko.json | 13 ++++++++++ packages/i18n/messages/ios/nl.json | 13 ++++++++++ packages/i18n/messages/ios/pt-BR.json | 13 ++++++++++ packages/i18n/messages/ios/zh-Hans.json | 13 ++++++++++ packages/shared-schemas/src/lists.ts | 2 ++ 23 files changed, 238 insertions(+), 14 deletions(-) create mode 100644 apps/web/app/api/v1/shared/[id]/report/route.ts diff --git a/apps/ios/app/shared/[id].tsx b/apps/ios/app/shared/[id].tsx index 954ac142..af80bbd0 100644 --- a/apps/ios/app/shared/[id].tsx +++ b/apps/ios/app/shared/[id].tsx @@ -1,4 +1,4 @@ -import { isTextKind, withReferral, type Item, type List, type PublicList } from "@pluck/shared-schemas"; +import { isTextKind, REPORT_REASONS, withReferral, type Item, type List, type PublicList } from "@pluck/shared-schemas"; import { Refused } from "@pluck/client"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { router, useLocalSearchParams } from "expo-router"; @@ -61,6 +61,17 @@ export default function SharedList() { }, ]); + // Something wrong with it: why, from the same reasons the public page asks, sent to a person. iOS's own alert, + // which lists them on iPhone and iPad alike. + const report = () => + Alert.alert(tr("shared.reportTitle"), undefined, [ + ...REPORT_REASONS.map((reason) => ({ + text: tr(`shared.reportReasons.${reason}`), + onPress: () => void api(`/api/v1/shared/${id}/report`, { json: { reason } }).then(() => toast(tr("shared.reported")), failed), + })), + { text: tr("common.cancel"), style: "cancel" as const }, + ]); + return ( @@ -69,9 +80,14 @@ export default function SharedList() { {tr("tabs.lists")} {list && ( - - {tr("shared.leave")} - + + + {tr("shared.report")} + + + {tr("shared.leave")} + + )} commands.find((c) => c.id === id)?.run(); const titles = commands.map((c) => c.title).join("|"); // set again only if the words change (another language) useEffect(() => { - void keyCommands.set(commands.map(({ run: _, ...c }) => c)); + void keyCommands.set(commands.filter((c) => !(over && c.typing === false)).map(({ run: _, ...c }) => c)); const sub = keyCommands.listen((id) => run.current(id)); return () => { sub.remove(); void keyCommands.set([]); }; - }, [titles]); + }, [titles, over]); return null; } diff --git a/apps/web/app/api/v1/shared/[id]/report/route.ts b/apps/web/app/api/v1/shared/[id]/report/route.ts new file mode 100644 index 00000000..eed829ee --- /dev/null +++ b/apps/web/app/api/v1/shared/[id]/report/route.ts @@ -0,0 +1,10 @@ +import { SharedReportBody } from "@pluck/shared-schemas"; +import { parseBody, route } from "@/lib/api"; +import { reportShared } from "@/lib/library"; + +// Report a List someone shared with you. It goes to a person, with the reports from public pages. +export const POST = route<{ id: string }>({ kind: "write" }, async ({ req, caller, params }) => { + const b = await parseBody(req, SharedReportBody); + await reportShared(caller.userId, params.id, b.reason, b.details); + return new Response(null, { status: 204 }); +}); diff --git a/apps/web/app/p/[handle]/[slug]/ReportLink.tsx b/apps/web/app/p/[handle]/[slug]/ReportLink.tsx index 980159e4..5677e5bd 100644 --- a/apps/web/app/p/[handle]/[slug]/ReportLink.tsx +++ b/apps/web/app/p/[handle]/[slug]/ReportLink.tsx @@ -5,8 +5,9 @@ import { useTranslations } from "next-intl"; import { useState, type FormEvent } from "react"; import styles from "./public.module.css"; -// The Report link in the footer: a short form, sent to a person. -export function ReportLink({ listId }: { listId: string }) { +// The Report link in the footer: a short form, sent to a person. `shared`: on a List shared with you, which may be +// private, the report goes in as the signed-in person it is shared with. +export function ReportLink({ listId, shared = false }: { listId: string; shared?: boolean }) { const t = useTranslations("site.publicList.report"); const [open, setOpen] = useState(false); const [reason, setReason] = useState<(typeof REPORT_REASONS)[number]>("spam"); @@ -15,7 +16,8 @@ export function ReportLink({ listId }: { listId: string }) { async function send(e: FormEvent) { e.preventDefault(); - const res = await fetch("/api/v1/reports", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ listId, reason, details: details || undefined }) }); + const [to, about] = shared ? [`/api/v1/shared/${listId}/report`, {}] : ["/api/v1/reports", { listId }]; + const res = await fetch(to, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ ...about, reason, details: details || undefined }) }); setState(res.ok ? "sent" : "error"); } diff --git a/apps/web/app/shared/[id]/page.tsx b/apps/web/app/shared/[id]/page.tsx index 5127e6d6..ef1a77be 100644 --- a/apps/web/app/shared/[id]/page.tsx +++ b/apps/web/app/shared/[id]/page.tsx @@ -10,6 +10,7 @@ import { useFormat } from "@/components/useFormat"; import { ItemRow, RowLead, RowNote } from "@/components/ItemRow"; import { readShared } from "@/lib/library"; import styles from "../../p/[handle]/[slug]/public.module.css"; +import { ReportLink } from "../../p/[handle]/[slug]/ReportLink"; import { LeaveButton } from "./LeaveButton"; import { NoAccess } from "./NoAccess"; @@ -60,6 +61,7 @@ export default async function SharedListPage({ params }: { params: Promise<{ id:
+
diff --git a/apps/web/lib/library/sharing.ts b/apps/web/lib/library/sharing.ts index b6a7e72c..1698d53a 100644 --- a/apps/web/lib/library/sharing.ts +++ b/apps/web/lib/library/sharing.ts @@ -1,6 +1,7 @@ import { signedUrl } from "@pluck/blob"; import { createList, createReport, createTextItem, getListMeta, getMe, hitRateLimit, leaveSharedList, listOwnedBy, listsSharedWith, pluckLink, publicCoverKey, + reportSharedList, publicList, publicListById, recordView, setHandle, setName, setVisibility, sharedCoverKey, sharedList, shareList, sharesOf, unshareList, setHeardFrom, updateSettings, MAX_PEOPLE, } from "@pluck/db"; @@ -173,6 +174,20 @@ export async function readShared(userId: string, listId: string): Promise { + if (!(await hitRateLimit(`report:${userId}`, 10, 86_400)).ok) throw new ApiError("rate_limited", "That is a lot of reports for one day. Try again tomorrow.", 429); + if (!(await reportSharedList(listId, (await me(userId)).email, reason, details ?? null))) throw new ApiError("not_found", "That List is not shared with you.", 404); + const to = process.env.ABUSE_EMAIL; + if (!to) return; + await sendEmail({ + to, + subject: `Report: ${reason} on shared list ${listId}`, + text: `A List was reported by someone it is shared with. It may be private.\n\nList: ${listId}\nReason: ${reason}\nDetails: ${details ?? "(none)"}\n\nReview it in /admin.\n`, + }).catch((e) => log("error", "report email failed", { error: e })); +} + export async function leaveShared(userId: string, listId: string): Promise { if (!(await leaveSharedList(listId, (await me(userId)).email))) throw new ApiError("not_found", "That List is not shared with you.", 404); } diff --git a/docs/ios.md b/docs/ios.md index 8db0da9c..b3eac347 100644 --- a/docs/ios.md +++ b/docs/ios.md @@ -110,6 +110,7 @@ The share extension and the shared Keychain need real signing, so these are chec 17. Add, the microphone in the box: iOS asks twice; say a sentence, tap stop: the words are in the box, and Pluck it makes a Note. In a Note, tap the microphone in the bar, speak over a pause, tap stop: the words are where the caret was. Airplane mode: it still works in a language the phone recognises itself (English, for one). 18. Add, type a sentence, tap a List chip and a tag chip, Pluck it: the row in the Inbox shows the tag, the Item shows it under its title, and the List holds the Item. Tap the chip there: the tag picker opens. Add, Note, type a line: a Tags chip appears under the title; pick a tag and it shows in its place. 19. A new account (sign in with an email never used): the Inbox holds "Nothing is deleted.", and Lists holds Favourites (empty) and Ideas with "Ask your AI what you plucked." in it. Lists, the +: type a name, Add: the new List opens. In a Note, type `#recipes` and a space: a recipes chip appears under the title within a second. Change the word to `#recipe`: the chip changes with it, and Settings, Tags shows no leftover. +20. A List someone shared with you: Report asks what is wrong (iOS's own alert, eight reasons), and choosing one says "Thanks. A person reads every report."; Leave still takes it off your Lists. On an iPad with a keyboard: open an Item, press T, and type a tag name without tapping the field first: nothing behind the sheet moves (the single-letter keys, the arrows and ⌘V step aside while a sheet is up). ## Known gaps diff --git a/e2e/lists.spec.ts b/e2e/lists.spec.ts index 723154e1..215013a8 100644 --- a/e2e/lists.spec.ts +++ b/e2e/lists.spec.ts @@ -158,6 +158,11 @@ test("share a List with one person, See only: the email link, their Lists, no ta await expect(visitor.getByText("Book early.")).toBeVisible(); await expect(visitor.getByText("private-tag")).toHaveCount(0); await expect(visitor.getByRole("checkbox")).toHaveCount(0); // no marks: they are the owner's + // Something wrong with it: a report goes to a person, from someone it is shared with. + await visitor.getByRole("button", { name: "Report this list" }).click(); + await visitor.getByLabel("What is wrong?").selectOption("harassment"); + await visitor.getByRole("button", { name: "Send the report" }).click(); + await expect(visitor.getByRole("status").filter({ hasText: "A person reads every report." })).toBeVisible(); await visitor.goto("/lists"); await expect(visitor.getByRole("region", { name: "Shared with you" })).toContainText("Holiday ideas"); @@ -165,6 +170,7 @@ test("share a List with one person, See only: the email link, their Lists, no ta const stranger = await (await browser.newContext()).newPage(); await signIn(stranger); expect((await stranger.request.get(`/api/v1/shared/${list.id}`)).status()).toBe(404); + expect((await stranger.request.post(`/api/v1/shared/${list.id}/report`, { data: { reason: "spam" } })).status()).toBe(404); // nor report it await stranger.goto(`/shared/${list.id}`); await expect(stranger.getByRole("heading", { name: "Not shared with you." })).toBeVisible(); await expect(stranger.getByRole("button", { name: "Use another email" })).toBeVisible(); diff --git a/packages/db/src/collections.ts b/packages/db/src/collections.ts index 204ae841..547d9e20 100644 --- a/packages/db/src/collections.ts +++ b/packages/db/src/collections.ts @@ -135,7 +135,8 @@ export const DEFAULT_SETTINGS: UserSettings = { expiryDays: 30, expiryScope: "in export type ReportDoc = { _id: ObjectId; listId: ObjectId; - reporterIp: string; // a salted hash, never the address itself + reporterIp: string; // a salted hash, never the address itself (for a shared List, of the email it was shared with) + shared?: true; // reported by someone it was shared with, not from its public page: it may well be private reason: string; details: string | null; createdAt: Date; diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts index c542c65c..03f9bdcb 100644 --- a/packages/db/src/index.ts +++ b/packages/db/src/index.ts @@ -23,7 +23,7 @@ export { analyticsOf, claimStarters, getMe, markMcpCall, setHeardFrom, setName, export { expireItems, archiveStale, countExpiringSoon, runDueExpiry, claimOnce, localNow } from "./expiry.ts"; export { DEFAULT_SETTINGS, type SignUpVia, type UserSettings } from "./collections.ts"; export { publicList, publicListById, publicCoverKey, recordView, createReport, PUBLIC_ITEM_FIELDS, sharedList, listsSharedWith, sharedCoverKey } from "./public.ts"; -export { shareList, sharesOf, unshareList, leaveSharedList, MAX_PEOPLE, type ShareResult } from "./shares.ts"; +export { shareList, sharesOf, unshareList, leaveSharedList, reportSharedList, MAX_PEOPLE, type ShareResult } from "./shares.ts"; export { openReports, resolveReport, killList, killUser, isAdminEmail } from "./admin.ts"; export { digestFor, isEmptyDigest, claimDueDigests, sendDigestOnce } from "./digest.ts"; export { aliasOf, regenerateAlias, userForAlias, createEmailItem, setRawEmailKey, type EmailItemInput } from "./email-in.ts"; diff --git a/packages/db/src/public.test.ts b/packages/db/src/public.test.ts index 2ceadcd6..3f47fd6e 100644 --- a/packages/db/src/public.test.ts +++ b/packages/db/src/public.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from "vitest"; import { applyExtraction, createList, createTag, editItem, getListMeta, getMe, killList, killUser, moveToBin, pluckLink, PUBLIC_ITEM_FIELDS, publicCoverKey, publicList, publicListById, recordView, setHandle, setItemTags, setBlobKeys, setVisibility, updateEntry, updateList, - addToList, deleteList, leaveSharedList, listsSharedWith, sharedList, shareList, sharesOf, unshareList, updateSettings, + addToList, deleteList, leaveSharedList, listsSharedWith, openReports, reportSharedList, sharedList, shareList, sharesOf, unshareList, updateSettings, } from "./index.ts"; import { twoUsers } from "./testing.ts"; @@ -173,3 +173,20 @@ describe("lists shared with people (See only)", () => { expect(await listsSharedWith("c@example.test")).toEqual([]); }); }); + +test("a List can be reported by someone it is shared with, and by nobody else; the report reaches the admin's list", async () => { + const { a, b } = await twoUsers(); + const list = await createList(a, { name: `Private and shared ${Date.now()}`, createdBy: "user" }); + const [aEmail, bEmail] = [(await getMe(a))!.email, (await getMe(b))!.email]; + // Not shared yet: b has no say on a List they cannot see. Nor has its owner, nor a stranger, once it is shared. + expect(await reportSharedList(list.id, bEmail, "spam", null)).toBe(false); + await shareList(a, list.id, bEmail); + expect(await reportSharedList(list.id, aEmail, "spam", null)).toBe(false); + expect(await reportSharedList(list.id, "stranger@example.test", "spam", null)).toBe(false); + expect(await reportSharedList(list.id, bEmail.toUpperCase(), "harassment", " Not for me. ")).toBe(true); + const mine = (await openReports()).filter((r) => r.list?.id === list.id); + expect(mine.map((r) => [r.reason, r.details, r.list?.name])).toEqual([["harassment", "Not for me.", list.name]]); + // Leaving ends it: no more reports from someone it is no longer shared with. + await leaveSharedList(list.id, bEmail); + expect(await reportSharedList(list.id, bEmail, "spam", null)).toBe(false); +}); diff --git a/packages/db/src/shares.ts b/packages/db/src/shares.ts index 4f682e7a..3e14ce43 100644 --- a/packages/db/src/shares.ts +++ b/packages/db/src/shares.ts @@ -1,7 +1,8 @@ import type { Locale } from "@pluck/i18n"; import type { ListShare } from "@pluck/shared-schemas"; +import { createHash } from "node:crypto"; import { ObjectId } from "mongodb"; -import { lists, listShares, oid, users, type ListShareDoc } from "./collections.ts"; +import { lists, listShares, oid, reports, users, type ListShareDoc } from "./collections.ts"; import { getMe } from "./users.ts"; // Sharing a list with people, See only. The owner adds and removes them by email; they read it through public.ts. @@ -49,6 +50,20 @@ export async function unshareList(userId: string, listId: string, shareId: strin return res.deletedCount === 1; } +// A report from someone the List is shared with, kept with the reports from public pages (packages/db/src/public.ts) +// for the same person to read. Only someone it is shared with can make one; who, is kept as a salted hash. +export async function reportSharedList(listId: string, viewerEmail: string, reason: string, details: string | null): Promise { + const email = viewerEmail.toLowerCase(); + const share = await (await listShares()).findOne({ listId: oid(listId), email }, { projection: { _id: 1 } }); + if (!share) return false; + const salt = process.env.BETTER_AUTH_SECRET ?? "pluck"; + await (await reports()).insertOne({ + _id: new ObjectId(), listId: oid(listId), reporterIp: createHash("sha256").update(`${salt}:${email}`).digest("hex").slice(0, 32), + reason, details: details?.trim().slice(0, 2000) || null, createdAt: new Date(), state: "open", shared: true, + }); + return true; +} + // The person it was shared with takes it off their Lists. export async function leaveSharedList(listId: string, viewerEmail: string): Promise { const res = await (await listShares()).deleteOne({ listId: oid(listId), email: viewerEmail.toLowerCase() }); diff --git a/packages/i18n/messages/ios/de.json b/packages/i18n/messages/ios/de.json index 7398a7fb..c4665546 100644 --- a/packages/i18n/messages/ios/de.json +++ b/packages/i18n/messages/ios/de.json @@ -302,6 +302,19 @@ "leaveTitle": "Diese Liste verlassen?", "leaveBody": "Sie verschwindet aus deinen Listen. Sie kann wieder mit dir geteilt werden.", "leave": "Verlassen", + "report": "Melden", + "reportTitle": "Was stimmt nicht?", + "reportReasons": { + "illegal": "Illegale Inhalte", + "minors": "Sexualisiert Minderjährige", + "harassment": "Belästigung", + "doxxing": "Veröffentlicht private Daten anderer", + "spam": "Spam oder eine Linkfarm", + "malware": "Schadsoftware oder Phishing", + "infringement": "Urheber- oder Markenrecht", + "other": "Etwas anderes" + }, + "reported": "Danke. Ein Mensch liest jede Meldung.", "byNamed": "Mit dir geteilt von {name} (@{handle}) · nur ansehen", "by": "Mit dir geteilt von @{handle} · nur ansehen", "notShared": { diff --git a/packages/i18n/messages/ios/en.json b/packages/i18n/messages/ios/en.json index df4f17e6..1266f0bf 100644 --- a/packages/i18n/messages/ios/en.json +++ b/packages/i18n/messages/ios/en.json @@ -302,6 +302,19 @@ "leaveTitle": "Leave this List?", "leaveBody": "It comes off your Lists. They can share it with you again.", "leave": "Leave", + "report": "Report", + "reportTitle": "What is wrong?", + "reportReasons": { + "illegal": "Illegal content", + "minors": "Sexualises minors", + "harassment": "Harassment", + "doxxing": "Shares someone's private details", + "spam": "Spam or a link farm", + "malware": "Malware or phishing", + "infringement": "Copyright or trademark", + "other": "Something else" + }, + "reported": "Thanks. A person reads every report.", "byNamed": "Shared with you by {name} (@{handle}) · see only", "by": "Shared with you by @{handle} · see only", "notShared": { diff --git a/packages/i18n/messages/ios/es.json b/packages/i18n/messages/ios/es.json index bb6212f6..745b6774 100644 --- a/packages/i18n/messages/ios/es.json +++ b/packages/i18n/messages/ios/es.json @@ -302,6 +302,19 @@ "leaveTitle": "¿Salir de esta Lista?", "leaveBody": "Desaparece de tus Listas. Esa persona puede volver a compartirla contigo.", "leave": "Salir", + "report": "Denunciar", + "reportTitle": "¿Qué ocurre?", + "reportReasons": { + "illegal": "Contenido ilegal", + "minors": "Sexualiza a menores", + "harassment": "Acoso", + "doxxing": "Comparte datos privados de alguien", + "spam": "Spam o granja de enlaces", + "malware": "Malware o phishing", + "infringement": "Derechos de autor o marcas", + "other": "Otra cosa" + }, + "reported": "Gracias. Una persona lee cada denuncia.", "byNamed": "Compartida contigo por {name} (@{handle}) · solo lectura", "by": "Compartida contigo por @{handle} · solo lectura", "notShared": { diff --git a/packages/i18n/messages/ios/fr.json b/packages/i18n/messages/ios/fr.json index 247c29ef..4d302da7 100644 --- a/packages/i18n/messages/ios/fr.json +++ b/packages/i18n/messages/ios/fr.json @@ -302,6 +302,19 @@ "leaveTitle": "Quitter cette liste ?", "leaveBody": "Elle disparaît de vos listes. Son auteur peut la partager à nouveau avec vous.", "leave": "Quitter", + "report": "Signaler", + "reportTitle": "Quel est le problème ?", + "reportReasons": { + "illegal": "Contenu illicite", + "minors": "Sexualise des mineurs", + "harassment": "Harcèlement", + "doxxing": "Divulgue des informations privées sur quelqu’un", + "spam": "Spam ou ferme de liens", + "malware": "Logiciel malveillant ou hameçonnage", + "infringement": "Droit d’auteur ou marque", + "other": "Autre chose" + }, + "reported": "Merci. Une personne lit chaque signalement.", "byNamed": "Partagée avec vous par {name} (@{handle}) · consultation seule", "by": "Partagée avec vous par @{handle} · consultation seule", "notShared": { diff --git a/packages/i18n/messages/ios/it.json b/packages/i18n/messages/ios/it.json index 91e97537..86c299b9 100644 --- a/packages/i18n/messages/ios/it.json +++ b/packages/i18n/messages/ios/it.json @@ -302,6 +302,19 @@ "leaveTitle": "Lasciare questa lista?", "leaveBody": "Sparisce dalle tue liste. Chi l'ha condivisa può condividerla di nuovo con te.", "leave": "Lascia", + "report": "Segnala", + "reportTitle": "Cosa c'è che non va?", + "reportReasons": { + "illegal": "Contenuti illegali", + "minors": "Sessualizza minori", + "harassment": "Molestie", + "doxxing": "Diffonde dati privati di qualcuno", + "spam": "Spam o link farm", + "malware": "Malware o phishing", + "infringement": "Diritto d'autore o marchio", + "other": "Altro" + }, + "reported": "Grazie. Ogni segnalazione viene letta da una persona.", "byNamed": "Condivisa con te da {name} (@{handle}) · solo visualizzazione", "by": "Condivisa con te da @{handle} · solo visualizzazione", "notShared": { diff --git a/packages/i18n/messages/ios/ja.json b/packages/i18n/messages/ios/ja.json index bafbef82..d3bde176 100644 --- a/packages/i18n/messages/ios/ja.json +++ b/packages/i18n/messages/ios/ja.json @@ -302,6 +302,19 @@ "leaveTitle": "このリストから退出しますか?", "leaveBody": "リスト一覧から外れます。共有した人は、またいつでも共有できます。", "leave": "退出", + "report": "報告", + "reportTitle": "何が問題ですか?", + "reportReasons": { + "illegal": "違法なコンテンツ", + "minors": "未成年者を性的に扱っている", + "harassment": "嫌がらせ", + "doxxing": "他人の個人情報を公開している", + "spam": "スパムまたはリンクファーム", + "malware": "マルウェアまたはフィッシング", + "infringement": "著作権または商標の侵害", + "other": "その他" + }, + "reported": "ありがとうございます。報告はすべて人が読んでいます。", "byNamed": "{name}さん(@{handle})が共有 · 閲覧のみ", "by": "@{handle}が共有 · 閲覧のみ", "notShared": { diff --git a/packages/i18n/messages/ios/ko.json b/packages/i18n/messages/ios/ko.json index b80767f4..64f9f679 100644 --- a/packages/i18n/messages/ios/ko.json +++ b/packages/i18n/messages/ios/ko.json @@ -302,6 +302,19 @@ "leaveTitle": "이 리스트에서 나갈까요?", "leaveBody": "내 리스트에서 사라져요. 상대가 다시 공유할 수 있어요.", "leave": "나가기", + "report": "신고", + "reportTitle": "무엇이 문제인가요?", + "reportReasons": { + "illegal": "불법 콘텐츠", + "minors": "미성년자를 성적으로 대상화함", + "harassment": "괴롭힘", + "doxxing": "다른 사람의 개인 정보 공개", + "spam": "스팸 또는 링크 팜", + "malware": "악성 소프트웨어 또는 피싱", + "infringement": "저작권 또는 상표권", + "other": "기타" + }, + "reported": "고마워요. 모든 신고는 사람이 직접 읽어요.", "byNamed": "{name}(@{handle})님이 공유함 · 보기 전용", "by": "@{handle}님이 공유함 · 보기 전용", "notShared": { diff --git a/packages/i18n/messages/ios/nl.json b/packages/i18n/messages/ios/nl.json index 2452a8fa..f7102ec6 100644 --- a/packages/i18n/messages/ios/nl.json +++ b/packages/i18n/messages/ios/nl.json @@ -302,6 +302,19 @@ "leaveTitle": "Deze Lijst verlaten?", "leaveBody": "Hij verdwijnt uit je Lijsten. De eigenaar kan hem opnieuw met je delen.", "leave": "Verlaat", + "report": "Melden", + "reportTitle": "Wat is er mis?", + "reportReasons": { + "illegal": "Illegale inhoud", + "minors": "Seksualiseert minderjarigen", + "harassment": "Intimidatie", + "doxxing": "Deelt iemands privégegevens", + "spam": "Spam of een linkfarm", + "malware": "Malware of phishing", + "infringement": "Auteursrecht of merkrecht", + "other": "Iets anders" + }, + "reported": "Bedankt. Elke melding wordt door een mens gelezen.", "byNamed": "Met je gedeeld door {name} (@{handle}) · alleen bekijken", "by": "Met je gedeeld door @{handle} · alleen bekijken", "notShared": { diff --git a/packages/i18n/messages/ios/pt-BR.json b/packages/i18n/messages/ios/pt-BR.json index 40d0729a..cb661b42 100644 --- a/packages/i18n/messages/ios/pt-BR.json +++ b/packages/i18n/messages/ios/pt-BR.json @@ -302,6 +302,19 @@ "leaveTitle": "Sair desta Lista?", "leaveBody": "Ela sai das suas Listas. A pessoa pode compartilhar com você de novo.", "leave": "Sair", + "report": "Denunciar", + "reportTitle": "Qual é o problema?", + "reportReasons": { + "illegal": "Conteúdo ilegal", + "minors": "Sexualiza menores", + "harassment": "Assédio", + "doxxing": "Expõe dados pessoais de alguém", + "spam": "Spam ou fazenda de links", + "malware": "Malware ou phishing", + "infringement": "Direitos autorais ou marca", + "other": "Outra coisa" + }, + "reported": "Obrigado. Uma pessoa lê cada denúncia.", "byNamed": "Compartilhada com você por {name} (@{handle}) · só para ver", "by": "Compartilhada com você por @{handle} · só para ver", "notShared": { diff --git a/packages/i18n/messages/ios/zh-Hans.json b/packages/i18n/messages/ios/zh-Hans.json index 7b38820f..2b89f748 100644 --- a/packages/i18n/messages/ios/zh-Hans.json +++ b/packages/i18n/messages/ios/zh-Hans.json @@ -302,6 +302,19 @@ "leaveTitle": "退出这个清单?", "leaveBody": "它会从你的清单中移除。对方可以再次与你共享。", "leave": "退出", + "report": "举报", + "reportTitle": "有什么问题?", + "reportReasons": { + "illegal": "违法内容", + "minors": "对未成年人进行性化", + "harassment": "骚扰", + "doxxing": "泄露他人隐私信息", + "spam": "垃圾信息或链接农场", + "malware": "恶意软件或网络钓鱼", + "infringement": "版权或商标侵权", + "other": "其他" + }, + "reported": "谢谢。每一份举报都有人亲自阅读。", "byNamed": "{name}(@{handle})与你共享 · 仅可查看", "by": "@{handle} 与你共享 · 仅可查看", "notShared": { diff --git a/packages/shared-schemas/src/lists.ts b/packages/shared-schemas/src/lists.ts index 13a9e43b..b6fa3330 100644 --- a/packages/shared-schemas/src/lists.ts +++ b/packages/shared-schemas/src/lists.ts @@ -135,6 +135,8 @@ export type SharedListSummary = z.infer; export const REPORT_REASONS = ["illegal", "minors", "harassment", "doxxing", "spam", "malware", "infringement", "other"] as const; export const ReportBody = z.object({ listId: ObjectIdString, reason: z.enum(REPORT_REASONS), details: z.string().max(2000).optional() }); +// The same report, on a List shared with you: the List is the one in the address. +export const SharedReportBody = ReportBody.omit({ listId: true }); export const CopyListBody = z.object({ listId: ObjectIdString }); export const AdminReport = z.object({