Code cleanup
This commit is contained in:
parent
6d970a4cc3
commit
b6e94d9a1e
3 changed files with 14 additions and 41 deletions
|
@ -35,8 +35,6 @@ class LoginController extends AbstractLoginController
|
|||
$username = $request->input('user');
|
||||
$useColumn = $this->getField($username);
|
||||
|
||||
sleep(1);
|
||||
|
||||
if ($this->hasTooManyLoginAttempts($request)) {
|
||||
$this->fireLockoutEvent($request);
|
||||
$this->sendLockoutResponse($request);
|
||||
|
|
|
@ -18,26 +18,15 @@ window.Ziggy = Ziggy;
|
|||
|
||||
Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
plugins: [
|
||||
createFlashStore(),
|
||||
],
|
||||
});
|
||||
const store = new Vuex.Store({ plugins: [createFlashStore()] });
|
||||
const route = require('./../../../../vendor/tightenco/ziggy/src/js/route').default;
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
route: route,
|
||||
},
|
||||
});
|
||||
Vue.mixin({ methods: { route } });
|
||||
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(VuexFlash, {
|
||||
mixin: true,
|
||||
template: require('./components/errors/Flash.template')
|
||||
});
|
||||
Vue.use(vuexI18n.plugin, store);
|
||||
Vue.use(VuexFlash, { mixin: true, template: require('./components/errors/Flash.template') });
|
||||
|
||||
Vue.i18n.add('en', Locales.en);
|
||||
Vue.i18n.set('en');
|
||||
|
@ -45,38 +34,21 @@ Vue.i18n.set('en');
|
|||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
{
|
||||
name: 'login',
|
||||
path: '/auth/login',
|
||||
component: Login,
|
||||
},
|
||||
{
|
||||
name: 'forgot-password',
|
||||
path: '/auth/password',
|
||||
component: Login,
|
||||
},
|
||||
{
|
||||
name: 'checkpoint',
|
||||
path: '/checkpoint',
|
||||
component: Login,
|
||||
},
|
||||
{ name: 'login', path: '/auth/login', component: Login },
|
||||
{ name: 'forgot-password', path: '/auth/password', component: Login },
|
||||
{ name: 'checkpoint', path: '/checkpoint', component: Login },
|
||||
{
|
||||
name: 'reset-password',
|
||||
path: '/auth/password/reset/:token',
|
||||
component: ResetPassword,
|
||||
props: function (route) {
|
||||
return {
|
||||
token: route.params.token,
|
||||
email: route.query.email || '',
|
||||
return { token: route.params.token, email: route.query.email || '' };
|
||||
}
|
||||
},
|
||||
}
|
||||
{ path: '*', redirect: '/auth/login' }
|
||||
]
|
||||
});
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
const app = new Vue({
|
||||
store,
|
||||
router,
|
||||
}).$mount('#pterodactyl');
|
||||
const app = new Vue({ store, router }).$mount('#pterodactyl');
|
||||
|
|
|
@ -27,6 +27,9 @@ Route::group(['middleware' => 'guest'], function () {
|
|||
// the forgot password routes to acquire a token (or after an account
|
||||
// is created).
|
||||
Route::post('/password/reset', 'ResetPasswordController')->name('auth.reset-password')->middleware('recaptcha');
|
||||
|
||||
// Catch any other combinations of routes and pass them off to the Vuejs component.
|
||||
Route::fallback('LoginController@index');
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue