Skip to content

Commit 4014880

Browse files
authored
Confirmation UI (#671)
# PRの概要 closes #600 ## 具体的な変更内容 <img width="342" alt="スクリーンショット 2025-02-21 12 19 27" src="https://github.com/user-attachments/assets/0e1cf64d-6f5f-43a5-8181-9de80a31a7c8" /> ## 影響範囲 初期登録画面 ## 動作要件 ## 補足 ## レビューリクエストを出す前にチェック! - [ ] 改めてセルフレビューしたか - [ ] 手動での動作検証を行ったか - [ ] server の機能追加ならば、テストを書いたか - 理由: 書いた | server の機能追加ではない - [ ] 間違った使い方が存在するならば、それのドキュメントをコメントで書いたか - 理由: 書いた | 間違った使い方は存在しない - [ ] わかりやすいPRになっているか <!-- レビューリクエスト後は、Slackでもメンションしてお願いすることを推奨します。 -->
1 parent d6a2263 commit 4014880

5 files changed

Lines changed: 38 additions & 23 deletions

File tree

web/app/signup/steps/step1_profile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Step1({ onSave, prev, caller }: StepProps<Step1User>) {
4444
return (
4545
<>
4646
<div className="flex h-full flex-col gap-4 p-4">
47-
<h1 className="text-xl">アカウント設定</h1>
47+
<h1 className="text-xl">アカウント設定(1/5)</h1>
4848
<div className="flex flex-col gap-2">
4949
<form onSubmit={handleSubmit(onSubmit)}>
5050
<Field fieldName="name" fieldLabel="名前" error={errors?.name}>

web/app/signup/steps/step2_img.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function Step2({
3939
return (
4040
<>
4141
<div className="g-2 flex flex-col p-2">
42+
<h1 className="text-xl">プロフィール画像設定(2/5)</h1>
4243
<div style={{ textAlign: "center", marginTop: "15vh" }}>
4344
<PhotoModal
4445
open={open}
Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Step1User } from "common/zod/types";
22
import type { BackProp, StepProps } from "~/app/signup/common";
3-
import CardBasicInfo from "~/components/CardBasicInfo";
3+
import UserAvatar from "~/components/human/avatar";
44
import type { Step2Data } from "./step2_img";
55

66
interface inputDataProps {
@@ -18,27 +18,40 @@ export default function Confirmation({
1818
throw new Error("don't skip the steps");
1919
}
2020
return (
21-
<div className="px-8 py-2">
22-
<h1 className="mb-2 text-xl">確認</h1>
23-
<p>以下の内容で登録する場合は「次へ」を押してください。</p>
24-
<h3 className="pt-4 text-lg">基本情報</h3>
25-
<div className="flex flex-col items-center py-4">
26-
<div
27-
className="rounded-md border-2 border-primary bg-secondary p-5"
28-
style={{ width: "min(50dvh, 87.5vw)" }}
29-
>
30-
<CardBasicInfo
31-
displayedUser={{
32-
...Step1Data,
33-
...Step2Data,
34-
id: 0, // dummy
35-
guid: "zero", // dummy
36-
}}
37-
/>
21+
<>
22+
<div className="px-8 py-2">
23+
<h1 className="mb-2 text-xl">確認(3/5)</h1>
24+
<p>以下の内容で登録する場合は「次へ」を押してください。</p>
25+
<div className="p-6 space-y-10">
26+
<div className="w-6/6 mx-auto">
27+
<h3 className="text-xl font-bold mb-2">プロフィール画像</h3>
28+
<div className="card bg-white p-6">
29+
<UserAvatar
30+
pictureUrl={Step2Data.pictureUrl}
31+
width={"200"}
32+
height={"200"}
33+
/>
34+
</div>
35+
</div>
36+
<div className="w-6/6 mx-auto">
37+
<h3 className="text-xl font-bold mb-2">基本情報</h3>
38+
<div className="card bg-white p-6">
39+
<p>名前:  {Step1Data.name}</p>
40+
<p>学年:  {Step1Data.grade}</p>
41+
<p>
42+
学部学科:{Step1Data.faculty}
43+
{Step1Data.department}
44+
</p>
45+
</div>
46+
</div>
47+
<div className="w-6/6 mx-auto">
48+
<h3 className="text-xl font-bold mb-2">自己紹介</h3>
49+
<div className="card bg-white p-6">
50+
<p className="pt-2">{Step1Data.intro}</p>
51+
</div>
52+
</div>
3853
</div>
3954
</div>
40-
<h3 className="pt-4 text-lg">自己紹介</h3>
41-
<p className="pt-2">{Step1Data.intro}</p>
4255
<div className="fixed bottom-0 left-0 flex w-full justify-between p-3">
4356
<button type="button" onClick={back} className="btn">
4457
前へ
@@ -51,6 +64,6 @@ export default function Confirmation({
5164
次へ
5265
</button>
5366
</div>
54-
</div>
67+
</>
5568
);
5669
}

web/app/signup/steps/step4_course.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function Step4({ onSave }: StepProps<void>) {
1313
<FullScreenCircularProgress />
1414
) : (
1515
<div className="mx-4 mt-4 flex flex-1 flex-col gap-4">
16-
<h1>授業情報の登録 (スキップ可)</h1>
16+
<h1>授業情報の登録(4/5,スキップ可)</h1>
1717
<div className="flex-1">
1818
<EditableCoursesTable userId={state.data} />
1919
</div>

web/app/signup/steps/step5_interests.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default function Step5({ back }: BackProp) {
8686
<>
8787
<div className="h-full overflow-y-scroll">
8888
<div className="mx-auto flex h-full max-w-lg flex-col px-4">
89+
<h1 className="text-xl">興味分野の登録(5/5、スキップ可)</h1>
8990
<div className="flex-1">
9091
<div className="flex flex-wrap gap-2 p-2">
9192
{draftSubjects.map((subject, index) => (

0 commit comments

Comments
 (0)