mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
Compare commits
2 commits
18c1a627e1
...
99b95749a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99b95749a9 | ||
| 8dfd1d0b12 |
6 changed files with 806 additions and 70 deletions
|
|
@ -38,7 +38,7 @@ const submitSchema = z.object({
|
||||||
.trim()
|
.trim()
|
||||||
.transform((val) => (val === "" ? null : val))
|
.transform((val) => (val === "" ? null : val))
|
||||||
.refine((val) => val === null || /^[a-zA-Z0-9_-]{11}$/.test(val), "Invalid YouTube video ID")
|
.refine((val) => val === null || /^[a-zA-Z0-9_-]{11}$/.test(val), "Invalid YouTube video ID")
|
||||||
.optional(),
|
.nullish(),
|
||||||
|
|
||||||
way: z.enum(["savedata", "manual"]).optional(),
|
way: z.enum(["savedata", "manual"]).optional(),
|
||||||
|
|
||||||
|
|
@ -102,8 +102,8 @@ export async function POST(request: NextRequest) {
|
||||||
gender: formData.get("gender") ?? undefined, // ZOD MOMENT
|
gender: formData.get("gender") ?? undefined, // ZOD MOMENT
|
||||||
makeup: formData.get("makeup") ?? undefined,
|
makeup: formData.get("makeup") ?? undefined,
|
||||||
miiPortraitImage: formData.get("miiPortraitImage"),
|
miiPortraitImage: formData.get("miiPortraitImage"),
|
||||||
youtubeId: formData.get("youtubeId"),
|
youtubeId: formData.get("youtubeId") ?? undefined,
|
||||||
way: formData.get("way"),
|
way: formData.get("way") ?? undefined,
|
||||||
|
|
||||||
miiDataFile: formData.get("miiDataFile") ?? undefined,
|
miiDataFile: formData.get("miiDataFile") ?? undefined,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
"react-image-crop": "^11.0.10",
|
"react-image-crop": "^11.0.10",
|
||||||
"react-router": "^7.14.1",
|
"react-router": "^7.14.1",
|
||||||
"tailwindcss": "^4.2.2",
|
"tailwindcss": "^4.2.2",
|
||||||
|
"vite-plugin-node-polyfills": "^0.26.0",
|
||||||
"zod": "^4.3.6"
|
"zod": "^4.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import SwitchFileUpload from "../components/submit-form/switch-file-upload";
|
||||||
import SwitchSubmitTutorialButton from "../components/tutorial/switch-submit";
|
import SwitchSubmitTutorialButton from "../components/tutorial/switch-submit";
|
||||||
import QrUpload from "../components/submit-form/qr-upload";
|
import QrUpload from "../components/submit-form/qr-upload";
|
||||||
import Camera from "../components/submit-form/camera";
|
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 Dropzone from "../components/dropzone";
|
||||||
import ImageList from "../components/submit-form/image-list";
|
import ImageList from "../components/submit-form/image-list";
|
||||||
import SubmitButton from "../components/submit-button";
|
import SubmitButton from "../components/submit-button";
|
||||||
|
|
@ -472,7 +472,7 @@ export default function SubmitPage() {
|
||||||
Use your camera
|
Use your camera
|
||||||
</button>
|
</button>
|
||||||
<Camera isOpen={isQrScannerOpen} setIsOpen={setIsQrScannerOpen} setQrBytesRaw={setQrBytesRaw} />
|
<Camera isOpen={isQrScannerOpen} setIsOpen={setIsQrScannerOpen} setQrBytesRaw={setQrBytesRaw} />
|
||||||
<ThreeDsScanTutorialButton />
|
<ThreeDsSubmitTutorialButton />
|
||||||
<span className="text-xs text-zinc-400">For emulators, aes_keys.txt is required.</span>
|
<span className="text-xs text-zinc-400">For emulators, aes_keys.txt is required.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,20 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig(({ command }) => ({
|
||||||
plugins: [react(), tailwindcss()],
|
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