misc_pterodactyl-panel/resources/assets/scripts/components/dashboard/Account.vue

52 lines
1.9 KiB
Vue
Raw Normal View History

<template>
2018-06-12 05:36:43 +00:00
<div>
<navigation/>
<div class="container animate fadein mt-2 sm:mt-6">
2018-06-16 23:25:26 +00:00
<modal :show="modalVisible" v-on:close="modalVisible = false">
<TwoFactorAuthentication v-on:close="modalVisible = false"/>
2018-06-16 23:25:26 +00:00
</modal>
2018-06-17 23:53:24 +00:00
<flash container="mt-2 sm:mt-6 mb-2"/>
2018-06-16 23:43:52 +00:00
<div class="flex flex-wrap">
<div class="w-full md:w-1/2">
<div class="sm:m-4 md:ml-0">
<update-email class="mb-4 sm:mb-8"/>
<div class="content-box text-center mb-4 sm:mb-0">
<button class="btn btn-green btn-sm" type="submit" id="grid-open-two-factor-modal"
v-on:click="openModal"
>Configure 2-Factor Authentication</button>
2018-06-16 23:43:52 +00:00
</div>
2018-06-16 23:25:26 +00:00
</div>
2018-06-12 05:36:43 +00:00
</div>
2018-06-16 23:43:52 +00:00
<div class="w-full md:w-1/2">
<change-password class="sm:m-4 md:mr-0"/>
2018-06-16 23:43:52 +00:00
</div>
2018-06-12 05:36:43 +00:00
</div>
</div>
</div>
</template>
2018-12-30 01:00:50 +00:00
<script lang="ts">
2018-06-12 05:36:43 +00:00
import Navigation from '../core/Navigation';
import Flash from '../Flash';
import UpdateEmail from './account/UpdateEmail';
2018-06-16 23:25:26 +00:00
import ChangePassword from './account/ChangePassword';
import Modal from '../core/Modal';
import TwoFactorAuthentication from './account/TwoFactorAuthentication';
2018-06-12 05:36:43 +00:00
export default {
2018-06-12 05:36:43 +00:00
name: 'account',
2018-06-16 23:25:26 +00:00
components: {TwoFactorAuthentication, Modal, ChangePassword, UpdateEmail, Flash, Navigation},
data: function () {
return {
modalVisible: false,
};
2018-06-12 05:36:43 +00:00
},
methods: {
openModal: function () {
this.$data.modalVisible = true;
window.events.$emit('two_factor:open');
},
}
};
</script>