v0.14.0 web replay UI, My games, CLI replay
This commit is contained in:
1 parent
87dcb3e550
commit
35ed475904
35 files changed
+4049
-1800
No files matched your search
@@ -32,6 +32,7 @@ func NewRegistry(s *session.Session) *Registry {
|
||||
|
||||
// Register all commands
|
||||
r.registerGameCommands()
|
||||
r.registerReplayCommands()
|
||||
r.registerAuthCommands()
|
||||
r.registerDebugCommands()
|
||||
|
||||
@@ -78,6 +79,10 @@ func (r *Registry) Execute(input string) {
|
||||
display.Println(display.Reset, "Type 'help' for available commands")
|
||||
return
|
||||
}
|
||||
if r.session.Replay != nil && liveOnly[cmd.Name] {
|
||||
display.Println(display.Red, "'%s' is not available while replaying; 'live' returns to the live session", cmd.Name)
|
||||
return
|
||||
}
|
||||
|
||||
// Set verbose mode in client if session supports it
|
||||
if cl, ok := r.session.GetClient().(*api.Client); ok {
|
||||
@@ -132,6 +137,18 @@ func (r *Registry) helpHandler(s *session.Session, args []string) error {
|
||||
{"pgn", "", ""},
|
||||
}
|
||||
|
||||
replayCommands := []cmdInfo{
|
||||
{"replay", "", ""},
|
||||
{"next", ">", ""},
|
||||
{"prev", "<", ""},
|
||||
{"first", "", ""},
|
||||
{"last", "", ""},
|
||||
{"goto", "", ""},
|
||||
{"auto", "", ""},
|
||||
{"fen", "", ""},
|
||||
{"live", "", ""},
|
||||
}
|
||||
|
||||
authCommands := []cmdInfo{
|
||||
{"register", "r", ""},
|
||||
{"login", "l", ""},
|
||||
@@ -163,6 +180,7 @@ func (r *Registry) helpHandler(s *session.Session, args []string) error {
|
||||
}
|
||||
|
||||
printCommandGroup("Game Commands", gameCommands)
|
||||
printCommandGroup("Replay Commands", replayCommands)
|
||||
printCommandGroup("Auth Commands", authCommands)
|
||||
printCommandGroup("Utility Commands", utilCommands)
|
||||
|
||||
|
||||
Reference in new issue
Block a user