mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
feat: remove copyright report type, private repo changes, fix instructions not removing booleans
This commit is contained in:
parent
949e86111a
commit
307aefa894
10 changed files with 18 additions and 818 deletions
|
|
@ -10,8 +10,8 @@ import { RateLimit } from "@/lib/rate-limit";
|
|||
const reportSchema = z.object({
|
||||
id: z.coerce.number({ error: "ID must be a number" }).int({ error: "ID must be an integer" }).positive({ error: "ID must be valid" }),
|
||||
type: z.enum(["mii", "user"], { error: "Type must be either 'mii' or 'user'" }),
|
||||
reason: z.enum(["inappropriate", "spam", "copyright", "bad_quality", "other"], {
|
||||
message: "Reason must be either 'inappropriate', 'spam', 'copyright', 'bad_quality' or 'other'",
|
||||
reason: z.enum(["inappropriate", "spam", "bad_quality", "other"], {
|
||||
message: "Reason must be either 'inappropriate', 'spam', 'bad_quality' or 'other'",
|
||||
}),
|
||||
notes: z.string().trim().max(256).optional(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -41,19 +41,6 @@ export default function Footer() {
|
|||
•
|
||||
</span>
|
||||
|
||||
<a
|
||||
href="https://github.com/trafficlunar/tomodachi-share"
|
||||
target="_blank"
|
||||
className="text-zinc-500 hover:text-zinc-700 transition-colors duration-200 hover:underline inline-flex items-end gap-1"
|
||||
>
|
||||
<Icon icon="mdi:github" className="text-lg" />
|
||||
Source Code
|
||||
</a>
|
||||
|
||||
<span className="text-zinc-400 hidden sm:inline" aria-hidden="true">
|
||||
•
|
||||
</span>
|
||||
|
||||
<a href="https://trafficlunar.net" target="_blank" className="text-zinc-500 hover:text-zinc-700 transition-colors duration-200 hover:underline group">
|
||||
Made by <span className="text-orange-400 group-hover:text-orange-500 font-medium transition-colors duration-200">trafficlunar</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ interface Props {
|
|||
const reasonMap: Record<ReportReason, string> = {
|
||||
INAPPROPRIATE: "Inappropriate content",
|
||||
SPAM: "Spam",
|
||||
COPYRIGHT: "Copyrighted content",
|
||||
BAD_QUALITY: "Bad quality",
|
||||
OTHER: "Other...",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const settings = {
|
||||
canSubmit: true,
|
||||
queueEnabled: false,
|
||||
queueEnabled: true,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export function minifyInstructions(instructions: Partial<SwitchMiiInstructions>)
|
|||
for (const key in object) {
|
||||
const value = object[key as keyof SwitchMiiInstructions];
|
||||
|
||||
if (value === null || value === undefined || (DEFAULT_ZERO_FIELDS.has(key) && value === 0)) {
|
||||
if (value === null || value === undefined || (typeof value === "boolean" && value === false) || (DEFAULT_ZERO_FIELDS.has(key) && value === 0)) {
|
||||
delete object[key as keyof SwitchMiiInstructions];
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue