-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Added Timing for each move
, Spectator Feature
, Chat Feature
, Review Page
and updated the ui for it
#198
base: main
Are you sure you want to change the base?
Conversation
changed some of the logic in your last PR |
Okay I will update it with the new one |
@hkirat Updated the code |
@hkirat Added Spectator Feature 2024-04-22_13-15-141.mp4 |
,
Spectator Feature` and updated the ui for it
,
Spectator Feature` and updated the ui for itTiming for each move
, Spectator Feature
and updated the ui for it
Timing for each move
, Spectator Feature
and updated the ui for itTiming for each move
, Spectator Feature
, Chat Feature
and updated the ui for it
added Chat Feature |
Updated |
dont know why it's showing a whitespace diff in yarn.lock |
I tried to remove it but showing whitespace |
@hkirat check it out |
path="/login" | ||
element={<Login />} | ||
path="/spectate/:gameId" | ||
element={<Layout children={<Spectate />} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should ideally happen on the same url
We shouldnt expect spectators to come at a different url
fine for now tho
@@ -305,30 +322,53 @@ export const ChessBoard = memo(({ | |||
to: squareRepresentation, | |||
}); | |||
} | |||
const timeTaken = | |||
time - new Date(myMoveStartTime).getTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be the same on both the side?
Should we wait for some ack from the server before setting this?
before: moveResult?.before, | ||
after: moveResult?.after, | ||
piece, | ||
createdAt: myMoveStartTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a good idea, people can fake the time they did a move on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did in backend
san: move.san | ||
before: move.before ?? '', | ||
after: move.after ?? '', | ||
createdAt: move.createdAt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt be client side
User will send a very old time to decrease their time and cheat
Needs to be set on the server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One big bug that should be fixed
Time should not be client side but calculated on the server
PLease tag me once fixed
Check it out |
)) | ||
CardTitle.displayName = "CardTitle" | ||
)); | ||
CardTitle.displayName = 'CardTitle'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a lot of noise?
Mind reverting these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not formatted before
so formatted
@hkirat Can check it out |
Closes #148 #142 #225 #226 #227 #316
Updated with all the latest Changes and solved all merge Conflicts
2024-05-05-17-37-5_GVH3UUmi.mp4
@hkirat Is this good?