Closed YuqingCheng closed 6 years ago
Got it, we'll fix that later. Working on Side bar.
@Cappuccinuo no problem, I can work on it tomorrow, just a reminder in case of forgetting about it...
@YuqingCheng I remove the judgement in index.
While I want to give user some information when lobby is empty. I tried to use put_flash, it is not working.
Then I tried to write a script to detect if current window's location is "/lobby", if not I will make a "swal" alert, it is conflict with redirect.
I am wondering if there is some way to detect the window location, after the mouse is up, then check the window location. Or there is a better way to inform user?
when a user created a new table, another user at index page has to refresh before clicking into the lobby page. Because @gameNum is only loaded for once in index page. Actually, the judgement of gameNum doesn't have to be done in index page. It can be judged in lobby page (.html.eex), if in lobby page we find gameNum is 0, just redirect back to index page.