airsonic-ui icon indicating copy to clipboard operation
airsonic-ui copied to clipboard

Login form is briefly flashing

Open rrrnld opened this issue 7 years ago • 1 comments

To reproduce:

  1. Login
  2. Open some link in the app, for example an album
  3. Copy the url
  4. Paste it into a new tab

Behavior:
Before being redirected you can briefly see the login form after the loading spinner.

Expected behavior:
The loading spinner should be the only thing we see.

rrrnld avatar Jul 09 '18 19:07 rrrnld

This is because the app finishes the boot process after we have verified our credentials (or made sure there aren't any. The relevant code is here: https://github.com/heyarne/airsonic-ui/blob/727d4548718a96867d5eb9ecc9daff752518b6c4/src/cljs/airsonic_ui/subs.cljs#L5-L12

As soon as we have credentials, :events/logged-in is fired, which only then redirects, thus causing the flashing.

rrrnld avatar Aug 01 '18 09:08 rrrnld