2022-09-20 19:59:52 +00:00
|
|
|
<template>
|
2022-11-08 16:44:04 +00:00
|
|
|
<div class="bg-white">
|
|
|
|
<div class="flex bg-gray-50">
|
|
|
|
<div class="w-full md:w-4/5 lg:w-3/5 md:mx-auto md:max-w-4xl px-4">
|
|
|
|
<div class="pt-4 pb-0">
|
|
|
|
<div class="flex">
|
|
|
|
<h2 class="flex-grow text-gray-900">
|
|
|
|
My Account
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
<ul class="flex text-gray-500">
|
|
|
|
<li>{{ user.email }}</li>
|
|
|
|
</ul>
|
2022-09-20 19:59:52 +00:00
|
|
|
|
2022-11-08 16:44:04 +00:00
|
|
|
<div class="mt-4 border-b border-gray-200 dark:border-gray-700">
|
|
|
|
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center">
|
|
|
|
<li class="mr-6" v-for="(tab, i) in tabsList" :key="i+1">
|
|
|
|
<router-link :to="{ name: tab.route }"
|
2023-08-30 07:58:29 +00:00
|
|
|
class="hover:no-underline inline-block py-4 rounded-t-lg border-b-2 text-gray-500 hover:text-gray-600"
|
2022-11-08 16:44:04 +00:00
|
|
|
active-class="text-blue-600 hover:text-blue-900 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500"
|
|
|
|
>{{tab.name}}</router-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="flex bg-white">
|
|
|
|
<div class="w-full md:w-4/5 lg:w-3/5 md:mx-auto md:max-w-4xl px-4">
|
|
|
|
<div class="mt-8 pb-0">
|
|
|
|
<transition name="fade" mode="out-in">
|
|
|
|
<router-view />
|
|
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-20 19:59:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
middleware: 'auth',
|
|
|
|
|
2022-11-08 16:44:04 +00:00
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-09-20 19:59:52 +00:00
|
|
|
computed: {
|
2022-11-08 16:44:04 +00:00
|
|
|
...mapGetters({
|
|
|
|
user: 'auth/user'
|
|
|
|
}),
|
|
|
|
tabsList () {
|
2022-09-20 19:59:52 +00:00
|
|
|
const tabs = [
|
|
|
|
{
|
2022-11-08 16:44:04 +00:00
|
|
|
name: 'Profile',
|
|
|
|
route: 'settings.profile'
|
2022-09-20 19:59:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-11-08 16:44:04 +00:00
|
|
|
name: 'Workspace Settings',
|
|
|
|
route: 'settings.workspaces'
|
2022-09-20 19:59:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-11-08 16:44:04 +00:00
|
|
|
name: 'Password',
|
2022-09-20 19:59:52 +00:00
|
|
|
route: 'settings.password'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete Account',
|
|
|
|
route: 'settings.account'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
if (this.user.is_subscribed) {
|
|
|
|
tabs.splice(1, 0, {
|
|
|
|
name: 'Billing',
|
|
|
|
route: 'settings.billing'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-11-08 16:44:04 +00:00
|
|
|
if(this.user.admin){
|
|
|
|
tabs.push({
|
|
|
|
name: 'Admin',
|
|
|
|
route: 'settings.admin'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-09-20 19:59:52 +00:00
|
|
|
return tabs
|
2022-11-08 16:44:04 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
2022-09-20 19:59:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|