mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
fix: bunch of fixes
This commit is contained in:
parent
74139dd54e
commit
86c655d7d0
10 changed files with 251 additions and 225 deletions
|
|
@ -16,16 +16,15 @@ export default function DatingPreferencesViewer({ data, onChecked }: Props) {
|
|||
const genderEnum = gender.toUpperCase() as MiiGender;
|
||||
|
||||
return (
|
||||
<div className="flex gap-1.5">
|
||||
<div key={gender} className="flex gap-1.5">
|
||||
<input
|
||||
key={gender}
|
||||
type="checkbox"
|
||||
id={gender}
|
||||
className="checkbox"
|
||||
checked={data.includes(genderEnum)}
|
||||
onChange={(e) => {
|
||||
if (onChecked) onChecked(e, genderEnum);
|
||||
}}
|
||||
{...(typeof window !== "undefined" && onChecked
|
||||
? { onChange: (e: ChangeEvent<HTMLInputElement>) => onChecked(e, genderEnum) }
|
||||
: { readOnly: true })}
|
||||
/>
|
||||
<label htmlFor={gender} className="text-sm select-none">
|
||||
{gender}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ function TableCell({ label, children }: TableCellProps) {
|
|||
}
|
||||
|
||||
function Section({ name, instructions, children, isSubSection }: SectionProps) {
|
||||
if (typeof instructions !== "object") return null;
|
||||
if (typeof instructions !== "object" || !instructions) return null;
|
||||
|
||||
const type = "type" in instructions ? instructions.type : undefined;
|
||||
const color = "color" in instructions ? instructions.color : undefined;
|
||||
|
|
@ -87,7 +87,7 @@ function Section({ name, instructions, children, isSubSection }: SectionProps) {
|
|||
const stretch = "stretch" in instructions ? instructions.stretch : undefined;
|
||||
|
||||
return (
|
||||
<div className={`p-3 ${isSubSection ? "mt-2" : "border-l-4 border-amber-400 bg-amber-100/50 rounded-r-lg py-2.5"}`}>
|
||||
<div className={`p-3 ${isSubSection ? "not-first:mt-2 pt-0!" : "border-l-4 border-amber-400 bg-amber-100/50 rounded-r-lg py-2.5"}`}>
|
||||
<h3 className="font-semibold text-xl text-amber-800 mb-1">{name}</h3>
|
||||
|
||||
<table className="w-full">
|
||||
|
|
@ -154,41 +154,13 @@ export default function MiiInstructions({ instructions }: Props) {
|
|||
{eyebrows && <Section name="Eyebrows" instructions={eyebrows}></Section>}
|
||||
{eyes && (
|
||||
<Section name="Eyes" instructions={eyes}>
|
||||
{eyes.eyesType && (
|
||||
<TableCell label="Eyes Type">
|
||||
<GridPosition index={eyes.eyesType} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.eyelashesTop && (
|
||||
<TableCell label="Eyelashes Top Type">
|
||||
<GridPosition index={eyes.eyelashesTop} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.eyelashesBottom && (
|
||||
<TableCell label="Eyelashes Bottom Type">
|
||||
<GridPosition index={eyes.eyelashesBottom} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.eyelidTop && (
|
||||
<TableCell label="Eyelid Top Type">
|
||||
<GridPosition index={eyes.eyelidTop} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.eyelidBottom && (
|
||||
<TableCell label="Eyelid Bottom Type">
|
||||
<GridPosition index={eyes.eyelidBottom} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.eyeliner && (
|
||||
<TableCell label="Eyeliner Type">
|
||||
<GridPosition index={eyes.eyeliner} />
|
||||
</TableCell>
|
||||
)}
|
||||
{eyes.pupil && (
|
||||
<TableCell label="Pupil Type">
|
||||
<GridPosition index={eyes.pupil} />
|
||||
</TableCell>
|
||||
)}
|
||||
<Section isSubSection name="Main" instructions={eyes.main} />
|
||||
<Section isSubSection name="Eyelashes Top" instructions={eyes.eyelashesTop} />
|
||||
<Section isSubSection name="Eyelashes Bottom" instructions={eyes.eyelashesBottom} />
|
||||
<Section isSubSection name="Eyelid Top" instructions={eyes.eyelidTop} />
|
||||
<Section isSubSection name="Eyelid Bottom" instructions={eyes.eyelidBottom} />
|
||||
<Section isSubSection name="Eyeliner" instructions={eyes.eyeliner} />
|
||||
<Section isSubSection name="Pupil" instructions={eyes.pupil} />
|
||||
</Section>
|
||||
)}
|
||||
{nose && <Section name="Nose" instructions={nose}></Section>}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ export default async function MiiList({ searchParams, userId, inLikesPage }: Pro
|
|||
{miis.map((mii) => (
|
||||
<div
|
||||
key={mii.id}
|
||||
className={`flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-[0.8rem] transition hover:scale-105 hover:bg-cyan-100 hover:border-cyan-600 ${mii.platform === "SWITCH" ? "border-red-300" : "border-blue-200"}`}
|
||||
className="flex flex-col relative bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-[0.8rem] transition hover:scale-105 hover:bg-cyan-100 hover:border-cyan-600"
|
||||
>
|
||||
<Carousel
|
||||
images={[
|
||||
|
|
@ -203,8 +203,15 @@ export default async function MiiList({ searchParams, userId, inLikesPage }: Pro
|
|||
/>
|
||||
|
||||
<div className="p-4 flex flex-col gap-1 h-full">
|
||||
<Link href={`/mii/${mii.id}`} className="font-bold text-2xl line-clamp-1" title={mii.name}>
|
||||
<Link href={`/mii/${mii.id}`} className="relative font-bold text-2xl line-clamp-1" title={mii.name}>
|
||||
{mii.name}
|
||||
<div className="absolute right-0 top-1/2 -translate-y-1/2 text-[1.25rem] opacity-25">
|
||||
{mii.platform === "SWITCH" ? (
|
||||
<Icon icon="cib:nintendo-switch" className="text-red-400" />
|
||||
) : (
|
||||
<Icon icon="cib:nintendo-3ds" className="text-sky-400" />
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
<div id="tags" className="flex flex-wrap gap-1">
|
||||
{mii.tags.map((tag) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue