Skip to content

Commit 6cebef1

Browse files
authored
日程提出の UI フローを修正 (#54)
* 固定バーの挙動を修正 * 参加形態選択 UI を修正 * オプションの選択を RHF で管理 * カラーパレットを調整 * ラベル空欄時のメッセージ * ラベル削除失敗時のエラーメッセージを表示 * 管理ボタン削除、編集画面からプロジェクトページに戻る * デフォルトの allowedRange を変更 * 参加形態削除ボタンの非活性 * 日時の入力欄の非活性も統一的に * 削除ボタンのスタイルを整理 * 参加形態を設定しない場合のフローを整理 * カードの枠線の色が消えるバグ修正 * bump hono and related packages
1 parent 120b41a commit 6cebef1

File tree

7 files changed

+398
-354
lines changed

7 files changed

+398
-354
lines changed

client/src/pages/Home.tsx

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { hc } from "hono/client";
22
import { useEffect, useState } from "react";
3-
import { HiOutlineCalendar, HiOutlineCog, HiOutlinePlus, HiOutlineUser, HiOutlineUsers } from "react-icons/hi";
3+
import { HiOutlineCalendar, HiOutlinePlus, HiOutlineUser, HiOutlineUsers } from "react-icons/hi";
44
import { NavLink } from "react-router";
55
import type { AppType } from "../../../server/src/main";
66
import Header from "../components/Header";
@@ -108,38 +108,25 @@ function ProjectCard({ project }: { project: BriefProject }) {
108108
return (
109109
<NavLink
110110
to={`/${project.id}`}
111-
className={`group hover:-translate-y-1 relative block transform overflow-hidden rounded-xl border-l-4 bg-white shadow-lg transition-all duration-300 hover:shadow-xl ${project.isHost ? "border-primary" : "border-secondary"}focus:outline-none focus:ring-4 focus:ring-primary/20`}
111+
className={`group hover:-translate-y-1 relative block transform overflow-hidden rounded-xl border-l-4 bg-white shadow-lg transition-all duration-300 hover:shadow-xl ${project.isHost ? "border-primary" : "border-secondary"} focus:outline-none focus:ring-4 focus:ring-primary/20`}
112112
aria-label={`「${project.name}」の詳細を見る`}
113113
>
114114
<div className="p-6">
115-
<div className="mb-4 flex items-start justify-between">
116-
<div className="mr-2 flex-1">
117-
<h3 className="mb-2 break-words font-semibold text-gray-800 text-xl">{project.name}</h3>
118-
<span className={`badge badge-sm ${project.isHost ? "badge-primary" : "badge-secondary"}`}>
119-
{project.isHost ? (
120-
<>
121-
<HiOutlineUser size={12} />
122-
<span>主催者</span>
123-
</>
124-
) : (
125-
<>
126-
<HiOutlineUsers size={12} />
127-
<span>参加者</span>
128-
</>
129-
)}
130-
</span>
131-
</div>
132-
133-
{project.isHost && (
134-
<NavLink
135-
to={`/${project.id}/edit`}
136-
onClick={(e) => e.stopPropagation()}
137-
className="btn btn-ghost btn-sm px-3 py-1 text-gray-500 transition-all hover:bg-gray-100 hover:text-gray-700"
138-
>
139-
<HiOutlineCog size={14} />
140-
<span className="text-xs">管理</span>
141-
</NavLink>
142-
)}
115+
<div className="mb-4">
116+
<h3 className="mb-2 break-words font-semibold text-gray-800 text-xl">{project.name}</h3>
117+
<span className={`badge badge-sm ${project.isHost ? "badge-primary" : "badge-secondary"}`}>
118+
{project.isHost ? (
119+
<>
120+
<HiOutlineUser size={12} />
121+
<span>主催者</span>
122+
</>
123+
) : (
124+
<>
125+
<HiOutlineUsers size={12} />
126+
<span>参加者</span>
127+
</>
128+
)}
129+
</span>
143130
</div>
144131

145132
<div className="mb-4 flex items-center text-gray-600">

0 commit comments

Comments
 (0)