2020-10-12 21:49:05 +00:00
|
|
|
<template>
|
2020-10-13 18:17:00 +00:00
|
|
|
<div>
|
|
|
|
<q-page
|
|
|
|
padding
|
|
|
|
class="fit row justify-center content-center items-center"
|
2020-10-16 07:38:14 +00:00
|
|
|
v-if="checkMain"
|
2020-10-13 18:17:00 +00:00
|
|
|
>
|
|
|
|
<q-card class="col-4" height="">
|
|
|
|
<q-card-section>
|
2020-10-16 07:38:14 +00:00
|
|
|
Name: {{ userState.firstname }} {{ userState.lastname }}<br />
|
|
|
|
E-Mail: {{ userState.mail }}<br />
|
|
|
|
Roles:
|
|
|
|
<ul v-for="role in userState.roles" v-bind:key="role">
|
2020-10-15 01:36:25 +00:00
|
|
|
<li>{{ role }}</li>
|
2020-10-16 07:38:14 +00:00
|
|
|
</ul>
|
|
|
|
<br />
|
|
|
|
Token expires: {{ userToken.expires }}
|
2020-10-13 18:17:00 +00:00
|
|
|
</q-card-section>
|
|
|
|
</q-card>
|
|
|
|
</q-page>
|
2020-10-12 21:49:05 +00:00
|
|
|
<router-view />
|
2020-10-13 18:17:00 +00:00
|
|
|
</div>
|
2020-10-12 21:49:05 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-15 01:36:25 +00:00
|
|
|
import { defineComponent, computed } from '@vue/composition-api';
|
2020-10-16 07:38:14 +00:00
|
|
|
import { UserStateInterface } from '../store/user';
|
2020-10-12 21:49:05 +00:00
|
|
|
import { mainLink } from '../plugin';
|
2020-10-15 01:36:25 +00:00
|
|
|
|
2020-10-12 21:49:05 +00:00
|
|
|
export default defineComponent({
|
|
|
|
// name: 'PageName'
|
2020-10-15 01:36:25 +00:00
|
|
|
setup(_, { root }) {
|
|
|
|
const userState = computed(
|
2020-10-16 07:38:14 +00:00
|
|
|
() => <UserStateInterface>root.$store.getters['user/user']
|
2020-10-15 01:36:25 +00:00
|
|
|
);
|
2020-10-16 07:38:14 +00:00
|
|
|
const userPermissions = computed(
|
|
|
|
() => <UserStateInterface>root.$store.getters['user/permissions']
|
2020-10-16 06:45:40 +00:00
|
|
|
);
|
2020-10-16 07:38:14 +00:00
|
|
|
const userToken = computed(
|
|
|
|
() => <UserStateInterface>root.$store.getters['user/token']
|
|
|
|
);
|
|
|
|
const checkMain = computed(() => {
|
|
|
|
return mainLink.name == root.$route.name;
|
|
|
|
});
|
|
|
|
return { userState, userPermissions, userToken, checkMain };
|
2020-10-12 21:49:05 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|