feat: add back edit page and fix profile settings

This commit is contained in:
trafficlunar 2026-04-18 18:25:10 +01:00
parent e81f054e3a
commit 63dbaf13fa
31 changed files with 1246 additions and 1292 deletions

View file

@ -2,4 +2,5 @@ export * from "./constants";
export * from "./qr-codes";
export * from "./switch";
export * from "./three-ds-tomodachi-life-mii";
export * from "./utils";
export type { SwitchMiiInstructions, MiiGender, MiiMakeup, MiiPlatform, ReportReason } from "./types";

18
shared/src/utils.ts Normal file
View file

@ -0,0 +1,18 @@
export function deepMerge<T>(target: T, source: Partial<T>): T {
const output = structuredClone(target);
if (typeof source !== "object" || source === null) return output;
for (const key in source) {
const sourceValue = source[key];
const targetValue = (output as any)[key];
if (typeof sourceValue === "object" && sourceValue !== null && !Array.isArray(sourceValue)) {
(output as any)[key] = deepMerge(targetValue, sourceValue);
} else {
(output as any)[key] = sourceValue;
}
}
return output;
}