Rename to Pollo! Bumped to v5!
This commit is contained in:
parent
8461d80130
commit
b47071957f
13 changed files with 101 additions and 106 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Sprint Padawan 
|
# Pollo
|
||||||
|
|
||||||
A scrum poker tool that helps agile teams plan their sprints in real-time.
|
A dead-simple real-time voting tool.
|
||||||
|
|
||||||
## Stack
|
## Stack
|
||||||
|
|
||||||
|
@ -19,7 +19,3 @@ A scrum poker tool that helps agile teams plan their sprints in real-time.
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Feel free to propose changes via PR. I'm not awfully picky about formatting right now, so I'll accept/reject on a case-by-case basis. Please make sure to have an issue first though.
|
Feel free to propose changes via PR. I'm not awfully picky about formatting right now, so I'll accept/reject on a case-by-case basis. Please make sure to have an issue first though.
|
||||||
|
|
||||||
## Stats
|
|
||||||
|
|
||||||

|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function ErrorPage() {
|
||||||
<h2 className="text-2xl font-bold m-2">
|
<h2 className="text-2xl font-bold m-2">
|
||||||
If you believe you reached this page in error, please file an issue{" "}
|
If you believe you reached this page in error, please file an issue{" "}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/atridadl/sprintpadawan/issues/new"
|
href="https://github.com/atridadl/pollo/issues/new"
|
||||||
className="link link-secondary"
|
className="link link-secondary"
|
||||||
>
|
>
|
||||||
here
|
here
|
||||||
|
@ -41,7 +41,7 @@ export default function ErrorPage() {
|
||||||
<h2 className="text-2xl font-bold m-2">
|
<h2 className="text-2xl font-bold m-2">
|
||||||
If you believe you reached this page in error, please file an issue{" "}
|
If you believe you reached this page in error, please file an issue{" "}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/atridadl/sprintpadawan/issues/new"
|
href="https://github.com/atridadl/pollo/issues/new"
|
||||||
className="link link-secondary"
|
className="link link-secondary"
|
||||||
>
|
>
|
||||||
here
|
here
|
||||||
|
@ -63,7 +63,7 @@ export default function ErrorPage() {
|
||||||
<h2 className="text-2xl font-bold m-2">
|
<h2 className="text-2xl font-bold m-2">
|
||||||
If you believe you reached this page in error, please file an issue{" "}
|
If you believe you reached this page in error, please file an issue{" "}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/atridadl/sprintpadawan/issues/new"
|
href="https://github.com/atridadl/pollo/issues/new"
|
||||||
className="link link-secondary"
|
className="link link-secondary"
|
||||||
>
|
>
|
||||||
here
|
here
|
||||||
|
|
|
@ -19,7 +19,7 @@ const Footer = () => {
|
||||||
-{" "}
|
-{" "}
|
||||||
<a
|
<a
|
||||||
className="link link-primary link-hover"
|
className="link link-primary link-hover"
|
||||||
href={`https://github.com/atridadl/sprintpadawan/releases/tag/${packagejson.version}`}
|
href={`https://github.com/atridadl/pollo/releases/tag/${packagejson.version}`}
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
|
|
|
@ -16,8 +16,8 @@ import "./tailwind.css";
|
||||||
|
|
||||||
export const meta: MetaFunction = () => {
|
export const meta: MetaFunction = () => {
|
||||||
return [
|
return [
|
||||||
{ title: "Sprint Padawan" },
|
{ title: "Pollo" },
|
||||||
{ name: "description", content: "Plan. Sprint. Repeat." },
|
{ name: "description", content: "Simple Real-Time Voting" },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ function App() {
|
||||||
<Links />
|
<Links />
|
||||||
</head>
|
</head>
|
||||||
<body className="h-[100%] w-[100%] fixed overflow-y-auto">
|
<body className="h-[100%] w-[100%] fixed overflow-y-auto">
|
||||||
<Header title={"Sprint Padawan"} />
|
<Header title={"Pollo"} />
|
||||||
<div className="flex flex-row items-center justify-center min-h-[calc(100%-114px)]">
|
<div className="flex flex-row items-center justify-center min-h-[calc(100%-114px)]">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ export default function Index() {
|
||||||
<div className="flex flex-col text-center items-center justify-center px-4 py-16 gap-4">
|
<div className="flex flex-col text-center items-center justify-center px-4 py-16 gap-4">
|
||||||
<h1 className="text-3xl sm:text-6xl font-bold">
|
<h1 className="text-3xl sm:text-6xl font-bold">
|
||||||
<span className="bg-gradient-to-r from-primary via-accent to-secondary bg-clip-text text-transparent box-decoration-clone">
|
<span className="bg-gradient-to-r from-primary via-accent to-secondary bg-clip-text text-transparent box-decoration-clone">
|
||||||
Sprint Padawan
|
Pollo
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
|
||||||
created_at: Date.now().toString(),
|
created_at: Date.now().toString(),
|
||||||
userId: userId || "",
|
userId: userId || "",
|
||||||
roomName: data.name,
|
roomName: data.name,
|
||||||
storyName: "First Story!",
|
topicName: "First Topic!",
|
||||||
scale: "0.5,1,2,3,5,8",
|
scale: "0.5,1,2,3,5,8",
|
||||||
visible: false,
|
visible: false,
|
||||||
})
|
})
|
||||||
|
|
|
@ -44,7 +44,7 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
roomName: oldRoom.roomName,
|
roomName: oldRoom.roomName,
|
||||||
storyName: oldRoom.storyName,
|
topicName: oldRoom.topicName,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,23 +54,23 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
|
||||||
|
|
||||||
const newRoom = data.reset
|
const newRoom = data.reset
|
||||||
? await db
|
? await db
|
||||||
.update(rooms)
|
.update(rooms)
|
||||||
.set({
|
.set({
|
||||||
storyName: data.name,
|
topicName: data.name,
|
||||||
visible: data.visible,
|
visible: data.visible,
|
||||||
scale: [...new Set(data.scale.split(","))]
|
scale: [...new Set(data.scale.split(","))]
|
||||||
.filter((item) => item !== "")
|
.filter((item) => item !== "")
|
||||||
.toString(),
|
.toString(),
|
||||||
})
|
})
|
||||||
.where(eq(rooms.id, params.roomId || ""))
|
.where(eq(rooms.id, params.roomId || ""))
|
||||||
.returning()
|
.returning()
|
||||||
: await db
|
: await db
|
||||||
.update(rooms)
|
.update(rooms)
|
||||||
.set({
|
.set({
|
||||||
visible: data.visible,
|
visible: data.visible,
|
||||||
})
|
})
|
||||||
.where(eq(rooms.id, params.roomId || ""))
|
.where(eq(rooms.id, params.roomId || ""))
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
const success = newRoom.length > 0;
|
const success = newRoom.length > 0;
|
||||||
|
|
||||||
|
|
|
@ -20,19 +20,19 @@ export const loader: LoaderFunction = async (args) => {
|
||||||
|
|
||||||
type RoomsResponse =
|
type RoomsResponse =
|
||||||
| {
|
| {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
roomName: string;
|
roomName: string;
|
||||||
}[]
|
}[]
|
||||||
| {
|
| {
|
||||||
roomName: string | null;
|
roomName: string | null;
|
||||||
id: string;
|
id: string;
|
||||||
created_at: Date | null;
|
created_at: Date | null;
|
||||||
userId: string;
|
userId: string;
|
||||||
storyName: string | null;
|
topicName: string | null;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
scale: string;
|
scale: string;
|
||||||
}[]
|
}[]
|
||||||
| null
|
| null
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ function RoomContent() {
|
||||||
| PresenceItem[]
|
| PresenceItem[]
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
const [storyNameText, setStoryNameText] = useState<string>("");
|
const [topicNameText, setTopicNameText] = useState<string>("");
|
||||||
const [roomScale, setRoomScale] = useState<string>("");
|
const [roomScale, setRoomScale] = useState<string>("");
|
||||||
|
|
||||||
const [copied, setCopied] = useState<boolean>(false);
|
const [copied, setCopied] = useState<boolean>(false);
|
||||||
|
@ -142,7 +142,7 @@ function RoomContent() {
|
||||||
cache: "no-cache",
|
cache: "no-cache",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name: storyNameText,
|
name: topicNameText,
|
||||||
visible: data.visible,
|
visible: data.visible,
|
||||||
scale: roomScale,
|
scale: roomScale,
|
||||||
reset: data.reset ? data.reset : false,
|
reset: data.reset ? data.reset : false,
|
||||||
|
@ -175,7 +175,7 @@ function RoomContent() {
|
||||||
userId: item.userId,
|
userId: item.userId,
|
||||||
roomId: item.roomId,
|
roomId: item.roomId,
|
||||||
roomName: item.roomName,
|
roomName: item.roomName,
|
||||||
storyName: item.storyName,
|
topicName: item.topicName,
|
||||||
scale: item.scale,
|
scale: item.scale,
|
||||||
votes: item.votes,
|
votes: item.votes,
|
||||||
};
|
};
|
||||||
|
@ -186,7 +186,7 @@ function RoomContent() {
|
||||||
userId: roomFromDbParsed.userId,
|
userId: roomFromDbParsed.userId,
|
||||||
roomId: roomFromDbParsed.id,
|
roomId: roomFromDbParsed.id,
|
||||||
roomName: roomFromDbParsed.roomName,
|
roomName: roomFromDbParsed.roomName,
|
||||||
storyName: storyNameText,
|
topicName: topicNameText,
|
||||||
scale: roomScale,
|
scale: roomScale,
|
||||||
votes: votesFromDbParsed?.map((vote) => {
|
votes: votesFromDbParsed?.map((vote) => {
|
||||||
return {
|
return {
|
||||||
|
@ -240,7 +240,7 @@ function RoomContent() {
|
||||||
// =================================
|
// =================================
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (roomFromDb) {
|
if (roomFromDb) {
|
||||||
setStoryNameText(roomFromDbParsed?.storyName || "");
|
setTopicNameText(roomFromDbParsed?.topicName || "");
|
||||||
setRoomScale(roomFromDbParsed?.scale || "ERROR");
|
setRoomScale(roomFromDbParsed?.scale || "ERROR");
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
@ -276,7 +276,7 @@ function RoomContent() {
|
||||||
<div className="card card-compact bg-base-100 shadow-xl">
|
<div className="card card-compact bg-base-100 shadow-xl">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<h2 className="card-title mx-auto">
|
<h2 className="card-title mx-auto">
|
||||||
Story: {roomFromDbParsed?.storyName}
|
Topic: {roomFromDbParsed?.topicName}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<ul className="p-0 flex flex-row flex-wrap justify-center items-center text-ceter gap-4">
|
<ul className="p-0 flex flex-row flex-wrap justify-center items-center text-ceter gap-4">
|
||||||
|
@ -324,13 +324,13 @@ function RoomContent() {
|
||||||
)}{" "}
|
)}{" "}
|
||||||
{presenceItem.userId ===
|
{presenceItem.userId ===
|
||||||
roomFromDbParsed?.userId && (
|
roomFromDbParsed?.userId && (
|
||||||
<span
|
<span
|
||||||
className="tooltip tooltip-warning"
|
className="tooltip tooltip-warning"
|
||||||
data-tip="Room Owner"
|
data-tip="Room Owner"
|
||||||
>
|
>
|
||||||
<CrownIcon className="inline-block text-warning" />
|
<CrownIcon className="inline-block text-warning" />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{" : "}
|
{" : "}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -351,11 +351,10 @@ function RoomContent() {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={index}
|
key={index}
|
||||||
className={`join-item ${
|
className={`join-item ${getVoteForCurrentUser()?.value === scaleItem
|
||||||
getVoteForCurrentUser()?.value === scaleItem
|
? "btn btn-active btn-primary"
|
||||||
? "btn btn-active btn-primary"
|
: "btn"
|
||||||
: "btn"
|
}`}
|
||||||
}`}
|
|
||||||
onClick={() => void setVoteHandler(scaleItem)}
|
onClick={() => void setVoteHandler(scaleItem)}
|
||||||
>
|
>
|
||||||
{scaleItem}
|
{scaleItem}
|
||||||
|
@ -389,15 +388,15 @@ function RoomContent() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<label className="label">{"Story Name:"} </label>
|
<label className="label">{"Topic Name:"} </label>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Story Name"
|
placeholder="Topic Name"
|
||||||
className="input input-bordered"
|
className="input input-bordered"
|
||||||
value={storyNameText}
|
value={topicNameText}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setStoryNameText(event.target.value);
|
setTopicNameText(event.target.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -434,8 +433,8 @@ function RoomContent() {
|
||||||
visible: false,
|
visible: false,
|
||||||
reset: true,
|
reset: true,
|
||||||
log:
|
log:
|
||||||
roomFromDbParsed?.storyName === storyNameText ||
|
roomFromDbParsed?.topicName === topicNameText ||
|
||||||
votesFromDb?.length === 0
|
votesFromDb?.length === 0
|
||||||
? false
|
? false
|
||||||
: true,
|
: true,
|
||||||
})
|
})
|
||||||
|
@ -447,8 +446,8 @@ function RoomContent() {
|
||||||
).length <= 1
|
).length <= 1
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{roomFromDbParsed?.storyName === storyNameText ||
|
{roomFromDbParsed?.topicName === topicNameText ||
|
||||||
votesFromDb?.length === 0 ? (
|
votesFromDb?.length === 0 ? (
|
||||||
<>
|
<>
|
||||||
<RefreshCwIcon className="text-xl mr-1" /> Reset
|
<RefreshCwIcon className="text-xl mr-1" /> Reset
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const rooms = pgTable("Room", {
|
||||||
created_at: text("created_at"),
|
created_at: text("created_at"),
|
||||||
userId: text("userId").notNull(),
|
userId: text("userId").notNull(),
|
||||||
roomName: text("roomName"),
|
roomName: text("roomName"),
|
||||||
storyName: text("storyName"),
|
topicName: text("topicName"),
|
||||||
visible: boolean("visible").default(false).notNull(),
|
visible: boolean("visible").default(false).notNull(),
|
||||||
scale: text("scale").default("0.5,1,2,3,5").notNull(),
|
scale: text("scale").default("0.5,1,2,3,5").notNull(),
|
||||||
});
|
});
|
||||||
|
@ -58,7 +58,7 @@ export const logs = pgTable(
|
||||||
scale: text("scale"),
|
scale: text("scale"),
|
||||||
votes: text("votes"),
|
votes: text("votes"),
|
||||||
roomName: text("roomName"),
|
roomName: text("roomName"),
|
||||||
storyName: text("storyName"),
|
topicName: text("topicName"),
|
||||||
},
|
},
|
||||||
(table) => {
|
(table) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -13,52 +13,52 @@ export interface PresenceItem {
|
||||||
|
|
||||||
export type RoomsResponse =
|
export type RoomsResponse =
|
||||||
| {
|
| {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
roomName: string;
|
roomName: string;
|
||||||
}[]
|
}[]
|
||||||
| {
|
| {
|
||||||
roomName: string | null;
|
roomName: string | null;
|
||||||
id: string;
|
id: string;
|
||||||
created_at: Date | null;
|
created_at: Date | null;
|
||||||
userId: string;
|
userId: string;
|
||||||
storyName: string | null;
|
topicName: string | null;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
scale: string;
|
scale: string;
|
||||||
}[]
|
}[]
|
||||||
| null
|
| null
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
export type RoomResponse =
|
export type RoomResponse =
|
||||||
| {
|
| {
|
||||||
|
id: string;
|
||||||
|
created_at: Date | null;
|
||||||
|
userId: string;
|
||||||
|
roomName: string | null;
|
||||||
|
topicName: string | null;
|
||||||
|
visible: boolean;
|
||||||
|
scale: string | null;
|
||||||
|
logs: {
|
||||||
id: string;
|
id: string;
|
||||||
created_at: Date | null;
|
created_at: Date | null;
|
||||||
userId: string;
|
userId: string;
|
||||||
|
roomId: string;
|
||||||
roomName: string | null;
|
roomName: string | null;
|
||||||
storyName: string | null;
|
topicName: string | null;
|
||||||
visible: boolean;
|
|
||||||
scale: string | null;
|
scale: string | null;
|
||||||
logs: {
|
votes: unknown;
|
||||||
id: string;
|
}[];
|
||||||
created_at: Date | null;
|
}
|
||||||
userId: string;
|
|
||||||
roomId: string;
|
|
||||||
roomName: string | null;
|
|
||||||
storyName: string | null;
|
|
||||||
scale: string | null;
|
|
||||||
votes: unknown;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
| undefined
|
| undefined
|
||||||
| null;
|
| null;
|
||||||
|
|
||||||
export type VoteResponse =
|
export type VoteResponse =
|
||||||
| {
|
| {
|
||||||
id: string;
|
id: string;
|
||||||
value: string;
|
value: string;
|
||||||
created_at: Date | null;
|
created_at: Date | null;
|
||||||
userId: string;
|
userId: string;
|
||||||
roomId: string;
|
roomId: string;
|
||||||
}[]
|
}[]
|
||||||
| null
|
| null
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sprintpadawan",
|
"name": "pollo",
|
||||||
"version": "4.3.2",
|
"version": "5.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
Loading…
Add table
Reference in a new issue