mibpl / StreetViewGame

MIT License
1 stars 1 forks source link

Make refresh work - add "Connecting..." dialog until we get user data #2

Closed anula closed 4 years ago

anula commented 4 years ago

Currently, when trying to refresh Lobby, it shows "Connection problem" dialog, since we assume that UID is already in the store.

But on refresh, current's view code wins, and UID is not there yet. Instead, we should show "Connecting..." dialog until all client info is filled in (just UID) and only then render the page.

anula commented 4 years ago

Every view should actually do that, so once we get to the actual logic the UID is already in Vuex store.

anula commented 4 years ago

Connecting... added to all views in https://github.com/mibpl/GeoguesserPrivate/commit/aa1d2d105456ff9aa5b003fc24ab7c7aac223cc8 and https://github.com/mibpl/GeoguesserPrivate/commit/9f642762b31812d818c07eaacbd34a89680f4937.

For each "room view" (ie. where user is expected to already be in the room they are connecting to) we should also add a guard that checks if they are already there, and if not, then:

anula commented 4 years ago

Added "roomGuard" in https://github.com/mibpl/GeoguesserPrivate/commit/02f4311c5af9c98e03152d07b09f4fce9f8071d6