From 9c3f563f8352f4e752b936c0d3a5ad5ac4054025 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Fri, 15 Feb 2019 12:56:08 +0000 Subject: [PATCH] fix: login page for no auth/proyx License: MIT Signed-off-by: Henrique Dias --- src/main.js | 8 ++++---- src/utils/constants.js | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.js b/src/main.js index 2d590c40..520bb8d7 100644 --- a/src/main.js +++ b/src/main.js @@ -3,17 +3,17 @@ import store from '@/store' import router from '@/router' import i18n from '@/i18n' import Vue from '@/utils/vue' -import { recaptcha, noAuth } from '@/utils/constants' +import { recaptcha, loginPage } from '@/utils/constants' import { login, validateLogin } from '@/utils/auth' import App from '@/App' sync(store, router) async function start () { - if (noAuth) { - await login('', '', '') - } else { + if (loginPage) { await validateLogin() + } else { + await login('', '', '') } if (recaptcha) { diff --git a/src/utils/constants.js b/src/utils/constants.js index 4443f9ba..306f460d 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -8,6 +8,7 @@ const signup = window.FileBrowser.Signup const version = window.FileBrowser.Version const logoURL = `/${staticURL}/img/logo.svg` const noAuth = window.FileBrowser.NoAuth +const loginPage = window.FileBrowser.LoginPage export { name, @@ -18,5 +19,6 @@ export { recaptchaKey, signup, version, - noAuth + noAuth, + loginPage }