Remove the pterodactyl directory when handling assets
This supports moving away from multiple-theme support in the Panel since that is no longer going to be offered.
This commit is contained in:
parent
f09eb8eec9
commit
b35eb77a70
18 changed files with 9 additions and 9 deletions
65
resources/assets/scripts/components/auth/TwoFactorForm.vue
Normal file
65
resources/assets/scripts/components/auth/TwoFactorForm.vue
Normal file
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<form class="bg-white shadow-lg rounded-lg pt-10 px-8 pb-6 mb-4 animate fadein" method="post"
|
||||
v-on:submit.prevent="submitToken"
|
||||
>
|
||||
<div class="flex flex-wrap -mx-3 mb-6">
|
||||
<div class="input-open">
|
||||
<input class="input" id="grid-code" type="number" name="token" aria-labelledby="grid-username" ref="code" required
|
||||
v-model="code"
|
||||
/>
|
||||
<label for="grid-code">{{ $t('auth.two_factor.label') }}</label>
|
||||
<p class="text-grey-darker text-xs">{{ $t('auth.two_factor.label_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-blue btn-jumbo" type="submit">
|
||||
{{ $t('auth.sign_in') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="pt-6 text-center">
|
||||
<router-link class="text-xs text-grey tracking-wide no-underline uppercase hover:text-grey-dark"
|
||||
:to="{ name: 'login' }"
|
||||
>
|
||||
Back to Login
|
||||
</router-link>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "two-factor-form",
|
||||
data: function () {
|
||||
return {
|
||||
code: '',
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.$refs.code.focus();
|
||||
},
|
||||
methods: {
|
||||
submitToken: function () {
|
||||
const self = this;
|
||||
|
||||
axios.post(this.route('auth.login-checkpoint'), {
|
||||
confirmation_token: this.$route.query.token,
|
||||
authentication_code: this.$data.code,
|
||||
})
|
||||
.then(function (response) {
|
||||
window.location = response.data.intended;
|
||||
})
|
||||
.catch(function (err) {
|
||||
if (!err.response) {
|
||||
return console.error(err);
|
||||
}
|
||||
|
||||
const response = err.response;
|
||||
if (response.data && _.isObject(response.data.errors)) {
|
||||
self.flash({message: response.data.errors[0].detail, variant: 'danger'});
|
||||
self.$router.push({ name: 'login' });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue