-
Notifications
You must be signed in to change notification settings - Fork 4
Bot pause resume #264
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
Merged
Merged
Bot pause resume #264
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
f7836a3
Added pause dialogs
ymmot239 cafcf45
Notification dialog
ymmot239 e384175
Server pause structure
ymmot239 f4b9f52
CHESSBOTS BEGINS NOW!!!! 🗣️🗣️🗣️🔥🔥🔥
MahdMalik 32a4936
CHESSBOTS BEGINS NOW!!!! 🗣️🗣️🗣️🔥🔥🔥
MahdMalik 5991b28
issue should be done less go
MahdMalik 1a64c4b
fixed es lint and various errors
MahdMalik 281f28c
ok now it should actually be fixed
MahdMalik d87139b
Merge branch 'main' into admin-pause-play
ymmot239 b3819e3
Merge branch 'admin-pause-play' of https://github.com/Comet-Robotics/…
MahdMalik a872c3f
advanced stop procedure
ymmot239 2439114
Merge branch 'main' of https://github.com/Comet-Robotics/chessbots-se…
MahdMalik 7e9a4fa
changed the pauseGame endpoint to also work if the server side calls …
MahdMalik eeecb63
theoretically may have pausing of the game working, gonna test now. I…
MahdMalik 9fccb54
added robot saves
ymmot239 072b3a4
Merge branch 'main' into admin-pause-play
ymmot239 fbc9ec7
integrating pause/unpause with bot disconnects/connects should be goo…
MahdMalik 96361c4
task should be done now, accounting for differnet people pausing. It'…
MahdMalik 84f702d
moved some variables to managers.ts, just need to fix some ugly code …
MahdMalik ee0153c
task finished maybe
MahdMalik 93b09d7
task is pretty mucch done, just gotta pass hte eslint check things.
MahdMalik c2d7b5e
Added pause rollback
ymmot239 e166cf9
pause on reload
ymmot239 7e626b1
alright, fixed eslint and format errors. Task should be done?
MahdMalik 17ec3c3
Merging play features into bot-pause-resume (#262)
MahdMalik d128db4
just finished merging, there is kind of an issue with how I'm going t…
MahdMalik c42eca4
got a workingg solution for now, I want to see if I can make it bette…
MahdMalik c2dfc02
Fixed merge conflicts
ymmot239 95d192c
Execution bugfix
ymmot239 d0d7456
Merge branch 'admin-pause-play' of https://github.com/Comet-Robotics/…
MahdMalik faa5547
nearly done, final thing is figuring out how I should do the follback…
MahdMalik 2d8d60d
paushing/resuming on bot disconnect/connect works now but I used an e…
MahdMalik ab1bb1c
changed it to have two exported functions as api.ts instead, this is …
MahdMalik 4d4def1
I HATE DEPENDENCY CYCLES
MahdMalik 8ae2199
TASK FINALLY FINISHED, CHESSBOTS BEGINS NOW!!!!!
MahdMalik d14416d
fixed issue with it keeping robot data even after disconnect, should …
MahdMalik 0a8b8f4
task is done I think?
MahdMalik 89309d6
1984. They don't like the parameter name theFlag.
MahdMalik 72f27d8
rmeove weird 2
MahdMalik b8c0c7f
fixed some type non-declarations too
MahdMalik faaa991
fixed formatting
MahdMalik 12b905b
ok actually fixed copilot's PR comments fully
MahdMalik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { | ||
Button, | ||
Dialog, | ||
DialogBody, | ||
DialogFooter, | ||
NonIdealState, | ||
} from "@blueprintjs/core"; | ||
import { useState } from "react"; | ||
import { bgColor, buttonColor, textColor } from "../check-dark-mode"; | ||
|
||
interface DrawDialogProps { | ||
dialogText?: string; | ||
} | ||
|
||
/** | ||
* Shows a paused dialog that cannot be closed | ||
* @param props - dialog text | ||
* @returns - pause dialog | ||
*/ | ||
export function PauseDialog(props: DrawDialogProps) { | ||
const [isOpen, setIsOpen] = useState(true); | ||
return ( | ||
<Dialog | ||
className={bgColor()} | ||
isOpen={isOpen} | ||
onClose={() => setIsOpen(false)} | ||
canOutsideClickClose={false} | ||
canEscapeKeyClose={false} | ||
> | ||
<DialogBody> | ||
<NonIdealState> | ||
<h4 className={textColor()}> | ||
{props.dialogText || "Game Paused"} | ||
</h4> | ||
</NonIdealState> | ||
</DialogBody> | ||
</Dialog> | ||
); | ||
} | ||
|
||
interface NotificationDialogProps { | ||
dialogText: string; | ||
} | ||
|
||
/** | ||
* Shows a closable notification dialog | ||
* @param props - dialog text | ||
* @returns - notification dialog | ||
*/ | ||
export function NotificationDialog(props: NotificationDialogProps) { | ||
const [isOpen, setIsOpen] = useState(true); | ||
|
||
/** okay button */ | ||
const actions = ( | ||
<Button | ||
text="Continue" | ||
rightIcon="arrow-right" | ||
className={buttonColor()} | ||
intent="primary" | ||
onClick={() => { | ||
setIsOpen(false); | ||
}} | ||
/> | ||
); | ||
|
||
return ( | ||
<Dialog | ||
className={bgColor()} | ||
isOpen={isOpen} | ||
onClose={() => setIsOpen(false)} | ||
canOutsideClickClose={true} | ||
canEscapeKeyClose={true} | ||
> | ||
<DialogBody> | ||
<NonIdealState> | ||
<h4 className={textColor()}>{props.dialogText}</h4> | ||
</NonIdealState> | ||
</DialogBody> | ||
<DialogFooter minimal actions={actions} /> | ||
</Dialog> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The paused move handler just references 'move' without doing anything. This should either be an empty function or have a comment explaining why the move parameter is referenced.
Copilot uses AI. Check for mistakes.