Add splash screen on Cockpit boot
Add a splash-screen to keep Cockpit's boot visually clean
- Hides all syncing messages that appear when switching users, especially when creating a new user.
- Until the new data-sync mechanism is implemented, a function compares the user data stored on the vehicle with the data in the browser; if every key from vehicle is present on browser storage and their values match, the splash screen closes.
- Minimum display time: 5 s (≈ 2.5 s actually visible because other modules preload).
- Maximum display time: 15 s (≈ 12.5 s visible).
- Includes a close button, a full-screen toggle, and the splash screen can also be dismissed with the Esc key.
https://github.com/user-attachments/assets/0f43e014-9f4e-411a-8e2b-11032b24ade8
https://github.com/user-attachments/assets/2d844650-a022-4f13-aaf1-2ba701e7b0ce
Closes #1800
Veeeeeery cool!!!
Could/should we add a transition when it disappears?
Veeeeeery cool!!!
Could/should we add a transition when it disappears?
Good idea!
Done
@ES-Alexander, can you take a look at the loading text? Maybe add some new funny lines as well?
can you take a look at the loading text? Maybe add some new funny lines as well?
I'll try to look tomorrow :-)
Tried this out, and it's really cool, but I think the logo window is too large - I think it should be more like the width of the user switcher, or slightly larger (but the BlueRobotics logo can probably about stay the size it is, so mainly the Cockpit logo and the lighthearted messages should be smaller, along with the window itself).
Done!
@ES-Alexander , allright to merge this PR?
@ArturoManzoli there's one thing I just realized: when developing, this will pop up on every hot-reload.
Can we add an option in the Dev menu to disable it?
Makes a lot of sense. I'll add that
@ArturoManzoli there's one thing I just realized: when developing, this will pop up on every hot-reload.
Can we add an option in the Dev menu to disable it?
Done!