chore: move files to frontend

This commit is contained in:
Henrique Dias committed 2019-05-21 11:13:59 +01:00
1 parent d45d7f92fb
commit 7414ca10b3
137 files changed

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
import { sync } from 'vuex-router-sync'
import store from '@/store'
import router from '@/router'
import i18n from '@/i18n'
import Vue from '@/utils/vue'
import { recaptcha, loginPage } from '@/utils/constants'
import { login, validateLogin } from '@/utils/auth'
import App from '@/App'
sync(store, router)
async function start () {
if (loginPage) {
await validateLogin()
} else {
await login('', '', '')
}
if (recaptcha) {
await new Promise (resolve => {
const check = () => {
if (typeof window.grecaptcha === 'undefined') {
setTimeout(check, 100)
} else {
resolve()
}
}
check()
})
}
new Vue({
el: '#app',
store,
router,
i18n,
template: '<App/>',
components: { App }
})
}
start()