mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-21 01:12:14 +00:00
deleted frontend code
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<!--Image input for replace avatar-->
|
||||
<MemberAvatar class="shadow-lg rounded-xl" :size="64" :is-border="false" :member="user" />
|
||||
|
||||
<!--User name & email-->
|
||||
<!--User name & email-->
|
||||
<div class="ml-4">
|
||||
<b class="text-md block font-bold sm:text-lg">
|
||||
{{ user.data.relationships.settings.data.attributes.first_name }}
|
||||
@@ -27,7 +27,7 @@
|
||||
<CardNavigation :pages="pages" class="-mx-1" />
|
||||
</div>
|
||||
|
||||
<!--Router Content-->
|
||||
<!--Router Content-->
|
||||
<router-view :user="user" @reload-user="fetchUser" />
|
||||
</div>
|
||||
<div id="loader" v-if="isLoading">
|
||||
@@ -38,106 +38,82 @@
|
||||
|
||||
<script>
|
||||
import CardNavigation from '../../../components/UI/Others/CardNavigation'
|
||||
import { UserIcon, HardDriveIcon, LockIcon, Trash2Icon, FileTextIcon, CreditCardIcon } from 'vue-feather-icons'
|
||||
import {UserIcon, HardDriveIcon, LockIcon, Trash2Icon, FileTextIcon, CreditCardIcon} from 'vue-feather-icons'
|
||||
import MobileHeader from '../../../components/Mobile/MobileHeader'
|
||||
import SectionTitle from '../../../components/UI/Labels/SectionTitle'
|
||||
import ColorLabel from '../../../components/UI/Labels/ColorLabel'
|
||||
import Spinner from '../../../components/UI/Others/Spinner'
|
||||
import { events } from '../../../bus'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {events} from '../../../bus'
|
||||
import {mapGetters} from 'vuex'
|
||||
import axios from 'axios'
|
||||
import MemberAvatar from "../../../components/UI/Others/MemberAvatar";
|
||||
|
||||
export default {
|
||||
name: 'Profile',
|
||||
components: {
|
||||
name: 'Profile',
|
||||
components: {
|
||||
MemberAvatar,
|
||||
CardNavigation,
|
||||
CreditCardIcon,
|
||||
HardDriveIcon,
|
||||
SectionTitle,
|
||||
FileTextIcon,
|
||||
MobileHeader,
|
||||
ColorLabel,
|
||||
Trash2Icon,
|
||||
UserIcon,
|
||||
LockIcon,
|
||||
Spinner,
|
||||
},
|
||||
watch: {
|
||||
'$route.fullPath': function () {
|
||||
this.fetchUser()
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
admin() {
|
||||
return this.$store.getters.user ? this.$store.getters.user : undefined
|
||||
},
|
||||
pages() {
|
||||
if (this.config.subscriptionType === 'none') {
|
||||
return [
|
||||
{
|
||||
title: this.$t('detail'),
|
||||
route: 'UserDetail',
|
||||
},
|
||||
{
|
||||
title: this.$t('storage'),
|
||||
route: 'UserStorage',
|
||||
},
|
||||
{
|
||||
title: this.$t('password'),
|
||||
route: 'UserPassword',
|
||||
},
|
||||
{
|
||||
title: this.$t('delete_account'),
|
||||
route: 'UserDelete',
|
||||
},
|
||||
]
|
||||
}
|
||||
CardNavigation,
|
||||
CreditCardIcon,
|
||||
HardDriveIcon,
|
||||
SectionTitle,
|
||||
FileTextIcon,
|
||||
MobileHeader,
|
||||
ColorLabel,
|
||||
Trash2Icon,
|
||||
UserIcon,
|
||||
LockIcon,
|
||||
Spinner,
|
||||
},
|
||||
watch: {
|
||||
'$route.fullPath': function () {
|
||||
this.fetchUser()
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
admin() {
|
||||
return this.$store.getters.user ? this.$store.getters.user : undefined
|
||||
},
|
||||
pages() {
|
||||
return [
|
||||
{
|
||||
title: this.$t('detail'),
|
||||
route: 'UserDetail',
|
||||
},
|
||||
{
|
||||
title: this.$t('storage'),
|
||||
route: 'UserStorage',
|
||||
},
|
||||
{
|
||||
title: this.$t('password'),
|
||||
route: 'UserPassword',
|
||||
},
|
||||
{
|
||||
title: this.$t('delete_account'),
|
||||
route: 'UserDelete',
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
user: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchUser() {
|
||||
axios.get('/api/admin/users/' + this.$route.params.id)
|
||||
.then((response) => {
|
||||
this.user = response.data
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.fetchUser()
|
||||
|
||||
return [
|
||||
{
|
||||
title: this.$t('detail'),
|
||||
route: 'UserDetail',
|
||||
},
|
||||
{
|
||||
title: this.$t('storage'),
|
||||
route: 'UserStorage',
|
||||
},
|
||||
{
|
||||
title: this.$t('billing'),
|
||||
route: 'UserSubscription',
|
||||
},
|
||||
{
|
||||
title: this.$t('password'),
|
||||
route: 'UserPassword',
|
||||
},
|
||||
{
|
||||
title: this.$t('delete_account'),
|
||||
route: 'UserDelete',
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
user: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchUser() {
|
||||
axios.get('/api/admin/users/' + this.$route.params.id).then((response) => {
|
||||
this.user = response.data
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.fetchUser()
|
||||
|
||||
events.$on('reload:user', () => this.fetchUser())
|
||||
},
|
||||
events.$on('reload:user', () => this.fetchUser())
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user