feat: landing page + logo, dev-mode banner + sync cap, non-blocking sync with progress splash
This commit is contained in:
@@ -7,13 +7,21 @@ api.interceptors.response.use(
|
||||
(r) => r,
|
||||
(err) => {
|
||||
if (err.response?.status === 401) {
|
||||
// Not signed in — kick off the Google login flow.
|
||||
window.location.href = '/api/v1/auth/login?returnUrl=/';
|
||||
// Not signed in. Send the user to the public landing page (unless already
|
||||
// there) so they can read the features and choose to log in.
|
||||
if (window.location.pathname !== '/') window.location.href = '/';
|
||||
}
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
// Top-level navigation that starts the Google flow and returns to the app.
|
||||
export const LOGIN_URL = '/api/v1/auth/login?returnUrl=/app';
|
||||
|
||||
export const AppApi = {
|
||||
info: () => api.get('/app/info').then((r) => r.data)
|
||||
};
|
||||
|
||||
export const AuthApi = {
|
||||
me: () => api.get('/auth/me').then((r) => r.data),
|
||||
logout: () => api.post('/auth/logout')
|
||||
|
||||
Reference in New Issue
Block a user