Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Offline Mode and Refactor Auto Login #5683

Merged
merged 7 commits into from
Apr 10, 2022
Merged

Offline Mode and Refactor Auto Login #5683

merged 7 commits into from
Apr 10, 2022

Conversation

HexaField
Copy link
Member

@HexaField HexaField commented Apr 8, 2022

Summary

Engine initialization now happens before any routes are loaded, meaning the engine is always loaded and running for all routes, which helps keep consistency and not duplicating code for each route.

This PR adds two offline modes:

  1. a truely offline mode which does not require (much) API access, and loads super fast (under 4 seconds for default scene). This can be accessed via /offline/<projectName>/<sceneName>
  2. a semi-ofline mode which still uses the API server but does not initialise a instance server connections. This can be accessed via /location/<locationName>?offline=true

Improves how the location name provided from the URL is handled, rather than passing it around (sometimes incorrectly) it is put into client state

Also refactors the use of AuthSevice.doAutoLogin which was being called in many places unnecessarily. Also removes the allowGuest which is redundant with how routes are provided from the API server.

Refactors the admin panel to not have intermediary 'pages' files that only served other components, now lazy loading those components directly.

  • adds VITE_FILE_SERVER to .env

Checklist

  • Pre-push checks pass npm run check
    • Linter passing via npm run lint
    • Unit & Integration tests passing via npm run test:packages
    • Docker build process passing via npm run build-client
  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

References

References to pertaining issue(s)

QA Steps

  1. git checkout pr_branch_name
  2. npm install
  3. npm run dev-reinit
  4. npm run dev

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Reviewers

Reviewers for this PR

@HexaField HexaField marked this pull request as ready for review April 9, 2022 00:24
@speigg speigg merged commit db6fc28 into dev Apr 10, 2022
@speigg speigg deleted the offline-mode-auth-refactor branch April 10, 2022 04:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants