Commit Graph

107 Commits

Author SHA1 Message Date
Tissevert 465c6981ae Implement proper user renaming + broadcast new name upon receiving a Hello message in a connected state 2020-02-02 19:23:24 +01:00
Tissevert 07a81237b6 Why was package unordered-containers still listed whereas it's not even used ? 2020-01-29 11:48:11 +01:00
Tissevert f1b44d649d Implement key persistence for server 2020-01-27 16:00:03 +01:00
Tissevert 81ec84abaf Follow move of 'logs' into PublicGame and start implementing re-sync protocol on the server side 2020-01-20 22:58:06 +01:00
Tissevert ca30340aaa Follow «Coordinates» change in protocol 2020-01-18 09:35:19 +01:00
Tissevert 4436ea10f7 Fix shameful bug that made me crazy and that made the loser of a round start the next 2020-01-17 21:33:01 +01:00
Tissevert 7b0d873558 Remove commented-out dead code, fix bad call to notifyPlayers (that still takes the logs as second argument) 2020-01-13 17:57:14 +01:00
Tissevert 65da786c69 Relay positive answers to invitations too, to simplify games list handling from client 2020-01-13 08:37:02 +01:00
Tissevert 0fa50ffb28 Adapt Game module to changes in protocol handling gameID with a shared GameState between public and private parts 2020-01-13 08:36:28 +01:00
Tissevert 4f5057b13f Rename cabal package 2020-01-11 21:24:16 +01:00
Tissevert 2798242dec Put text initialization back into login module 2019-12-27 08:42:36 +01:00
Tissevert e9548e9a22 Remove stupid 'list' class that is essentially <ul> elements 2019-12-27 08:23:02 +01:00
Tissevert bfb86a6a0d Transition to using UnitJS's fun module 2019-12-26 19:58:58 +01:00
Tissevert 555e4386e3 Use the Show instance of IDs to improve debug 2019-12-26 19:31:43 +01:00
Tissevert 0ea6fec5ae Stop handling messages from the room module, expose useful functions and let hall handle (de)connection messages instead 2019-12-24 00:43:57 +01:00
Tissevert dc920bd80b Handle Player log out with multiple sessions and get rid of the too simple «logOut» function 2019-12-24 00:39:56 +01:00
Tissevert 4a535caccc Remove handling from LogOut messages that are no longer sent by client but by the server 2019-12-24 00:35:45 +01:00
Tissevert 2518aedab1 Add a message for empty games list 2019-12-23 22:36:13 +01:00
Tissevert 7c2b88e4bd Don't forget to clear the text message when refreshing players and to synchronise the button state according to the result of the filtering 2019-12-23 22:32:52 +01:00
Tissevert 596a3cc453 Keep track of login state in session module, it might be useful somewhere 2019-12-23 22:28:05 +01:00
Tissevert c329ed556c Stop broadcasting to clients not yet logged in 2019-12-23 09:23:32 +01:00
Tissevert d17edb201d Trigger a refresh of the players list when someone logs in 2019-12-21 23:08:38 +01:00
Tissevert 0c285c47bb Have room module ignore when the user herself logs in 2019-12-21 23:07:19 +01:00
Tissevert 96424bfa2e Implement multi-sessions for players 2019-12-17 15:01:33 +01:00
Tissevert 09e6f6a5e9 Use the new Ui module in hall and login 2019-12-14 18:26:24 +01:00
Tissevert 84fe6d228e Move game styling into the screen namespace 2019-12-14 18:24:28 +01:00
Tissevert ef2c9cb3de Add an Ui module to provide operations on «widgets» — so far only the forms that can be enabled/disabled according to the state of the webSocket connection 2019-12-14 18:21:03 +01:00
Tissevert d6b990b202 Group parts of UnitJS in a single file deployed in lib 2019-12-14 18:17:08 +01:00
Tissevert 932a7db389 Generalize CSS for listSelectors and move it to the right place 2019-12-12 22:20:28 +01:00
Tissevert d496bca168 Keep separating hall and login, simplifying both, generalize listSelector and add one for games 2019-12-12 22:16:49 +01:00
Tissevert 0147ca0135 Forgot unused variable 2019-12-11 22:05:17 +01:00
Tissevert 8f3567660f Split login and main screen («hall») and make all those screens «submodules» of the screen module 2019-12-11 22:03:16 +01:00
Tissevert d018c7e62c Start separating the login stage from selecting an opponent (still a *lot* of work to do, barely started) 2019-12-08 23:01:44 +01:00
Tissevert 019909ba61 Use new LogIn server message, make sure the user is logged in after sending them the welcome message (so that they don't see themselves in the room) and broadcast the new LogIn message (to everyone including the newcomer) 2019-12-08 23:00:29 +01:00
Tissevert 9e228c7e94 Handle WS reconnection in messaging module 2019-11-24 22:56:53 +01:00
Tissevert 11e33a95bb Add the correct imports for new session module 2019-11-24 22:56:00 +01:00
Tissevert 403ee2da92 Add start routine in session module picking the correct message and add an explicit loggedIn private boolean, rename the getter 2019-11-24 22:54:46 +01:00
Tissevert 0b834b4876 Sort initializers into separate init functions for DOM and WS events, stop passing session.loggedIn() around in refresh and setMode functions and send first message through session 2019-11-24 22:52:57 +01:00
Tissevert cd517821c3 Add a module to wrap around localStorage and make it handy 2019-11-24 17:52:22 +01:00
Tissevert e5ee61e848 Revert "Switch session logging out and relaying the log-out message to keep the sessionID accessible until the end" : the solution was to handle cases when the player wasn't logged in separately
This reverts commit 3bd2829cf2.
2019-11-20 18:27:41 +01:00
Tissevert 0d19c4f8dc Use the newest requirements in lib to define an ID prefix for the Session type 2019-11-20 18:26:23 +01:00
Tissevert 7a937355d2 Stop sending an error and simply ignore relay from an unauthenticated player because that should only happen on immediate logout for which there's nothing to do 2019-11-18 17:13:32 +01:00
Tissevert 3bd2829cf2 Switch session logging out and relaying the log-out message to keep the sessionID accessible until the end 2019-11-18 17:11:05 +01:00
Tissevert a07285c7fc Remove deprecated comment 2019-11-18 17:09:12 +01:00
Tissevert 25bcf0631c Completely replace App.server by App.get, a function applying a projector to the server 2019-11-18 17:09:00 +01:00
Tissevert fef08fd478 Merge branch 'main' into stateless-saltine 2019-11-17 17:07:21 +01:00
Tissevert c024ea261c Make git ignore cabal by-products 2019-11-17 17:00:47 +01:00
Tissevert bfb4837352 Separate PlayerIDs from SessionIDs and simplify protocol accordingly 2019-11-12 23:25:00 +01:00
Tissevert 50b24a0db6 Add a Player type back and slowly start separating SessionIDs (temporary) and PlayerID (permanent) 2019-11-05 18:14:24 +01:00
Tissevert 3aca8283e2 WIP: Still breaking everything, trying to replace PlayerID by SessionID now 2019-10-28 08:19:14 +01:00