Skip to content

Commit

Permalink
Merge pull request #7278 from butzopower/allow-rejoining-password-games
Browse files Browse the repository at this point in the history
Allow rejoining password protected games by re-entering password
  • Loading branch information
NoahTheDuke authored Mar 18, 2024
2 parents baca0ff + 97518da commit d292c9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cljs/nr/game_row.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@

(defn rejoin-button [lobby-state user game current-game editing]
(when (can-rejoin? user game current-game editing)
[:button {:on-click #(do (join-game lobby-state game "rejoin")
(resume-sound))}
[:button {:on-click #(if (:password game)
(authenticated
(fn [_]
(swap! lobby-state assoc :password-game {:game game :action "rejoin"})))
(do (join-game lobby-state game "rejoin")
(resume-sound)))}
(tr [:lobby.rejoin "Rejoin"])]))

(defn mod-menu-popup [s user {gameid :gameid}]
Expand Down

0 comments on commit d292c9e

Please sign in to comment.