User data needs to be refreshed on sign in, otherwise we don't have
fresh data regarding isSyncing property and other fields which can
change between refreshing page.
This commit changes a way we load accounts for profile view:
* instead of using several views with profile controllers, always use
one view to render hooks. This is achieved by redirecting to
individual account page from main profile page (for example when going
into /profile as a user drogus, the effective address will be
/profile/drogus)
* instead of using observers to wait for accounts to load I just use
promise in ProfileRoute#model which effectively ensures that accounts
are loaded at the time we want to select an individual account
* profile controller is split into profile and account controller
Specyfing "pane" as an outlet name here was a legacy thing. In current
form it doesn't give us anything and results in more code, as we need to
specify outlet everytime we want to render something there.
We use promise when fetching a repository which means that any nested
routes already have all the repository data loaded. Thanks to that there
is no need to setup observers, we can check what to render right away in
RepoIndexRoute
This is a leftover from previous version of auth code. The purpose of
this code was to redirect to index if we're on auth route and user is
already signed in. This may happen only when we use autoSignIn which is
synchronuous, so it should be fine to just check if user is signed in
and redirect to index there.
* don't use __container__
* register it as a factory on container and inject into routes and
controller
* avoid afterSignIn errors by checking on hooksTarget, ApplicationRoute
should register itself as a hooksTarget
* keep user info on auth
Caching was broken for many reasons:
* Puma calls `Travis::Web::App.initilize` multiple times. This caused
the server start time to be incorrect, breaking caching.
* The `Date` HTTP header was missing. This caused some browsers to fail to cache
assets.
* The `ETag` was incorrectly formatted.
Some other things which were changed:
* Removed `Rack::Cache`