mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 05:07:46 +00:00
fix: unable to submit 3ds miis
This commit is contained in:
parent
7e10cef0b8
commit
8dfd1d0b12
6 changed files with 806 additions and 70 deletions
|
|
@ -38,7 +38,7 @@ const submitSchema = z.object({
|
|||
.trim()
|
||||
.transform((val) => (val === "" ? null : val))
|
||||
.refine((val) => val === null || /^[a-zA-Z0-9_-]{11}$/.test(val), "Invalid YouTube video ID")
|
||||
.optional(),
|
||||
.nullish(),
|
||||
|
||||
way: z.enum(["savedata", "manual"]).optional(),
|
||||
|
||||
|
|
@ -102,8 +102,8 @@ export async function POST(request: NextRequest) {
|
|||
gender: formData.get("gender") ?? undefined, // ZOD MOMENT
|
||||
makeup: formData.get("makeup") ?? undefined,
|
||||
miiPortraitImage: formData.get("miiPortraitImage"),
|
||||
youtubeId: formData.get("youtubeId"),
|
||||
way: formData.get("way"),
|
||||
youtubeId: formData.get("youtubeId") ?? undefined,
|
||||
way: formData.get("way") ?? undefined,
|
||||
|
||||
miiDataFile: formData.get("miiDataFile") ?? undefined,
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"react-image-crop": "^11.0.10",
|
||||
"react-router": "^7.14.1",
|
||||
"tailwindcss": "^4.2.2",
|
||||
"vite-plugin-node-polyfills": "^0.26.0",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import SwitchFileUpload from "../components/submit-form/switch-file-upload";
|
|||
import SwitchSubmitTutorialButton from "../components/tutorial/switch-submit";
|
||||
import QrUpload from "../components/submit-form/qr-upload";
|
||||
import Camera from "../components/submit-form/camera";
|
||||
import ThreeDsScanTutorialButton from "../components/tutorial/3ds-scan";
|
||||
import ThreeDsSubmitTutorialButton from "../components/tutorial/3ds-submit";
|
||||
import Dropzone from "../components/dropzone";
|
||||
import ImageList from "../components/submit-form/image-list";
|
||||
import SubmitButton from "../components/submit-button";
|
||||
|
|
@ -472,7 +472,7 @@ export default function SubmitPage() {
|
|||
Use your camera
|
||||
</button>
|
||||
<Camera isOpen={isQrScannerOpen} setIsOpen={setIsQrScannerOpen} setQrBytesRaw={setQrBytesRaw} />
|
||||
<ThreeDsScanTutorialButton />
|
||||
<ThreeDsSubmitTutorialButton />
|
||||
<span className="text-xs text-zinc-400">For emulators, aes_keys.txt is required.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
});
|
||||
export default defineConfig(({ command }) => ({
|
||||
plugins: [react(), tailwindcss(), nodePolyfills()],
|
||||
resolve: {
|
||||
alias:
|
||||
command === "build"
|
||||
? [
|
||||
{
|
||||
find: "vite-plugin-node-polyfills/shims/buffer",
|
||||
replacement: require.resolve("vite-plugin-node-polyfills/shims/buffer"),
|
||||
},
|
||||
]
|
||||
: [],
|
||||
},
|
||||
}));
|
||||
|
|
|
|||
739
pnpm-lock.yaml
739
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue