From 0397f9ee6852fe9b5bf178e42cce27542a6bd596 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 18 May 2024 11:18:23 +0200 Subject: [PATCH] feat: AccountDescriptor & AccountDescriptorMenu --- src/pages/Account/Card/AccountDescriptor.vue | 132 +++++++----------- .../Account/Card/AccountDescriptorMenu.vue | 58 ++++---- 2 files changed, 83 insertions(+), 107 deletions(-) diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue index b19c1f619..55ae92b92 100644 --- a/src/pages/Account/Card/AccountDescriptor.vue +++ b/src/pages/Account/Card/AccountDescriptor.vue @@ -9,7 +9,8 @@ import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { getUrl } from 'src/composables/getUrl'; - +import AccountDescriptorMenu from './AccountDescriptorMenu.vue'; +import { useSession } from 'src/composables/useSession'; const $props = defineProps({ id: { type: Number, @@ -22,14 +23,22 @@ const route = useRoute(); const state = useState(); const { t } = useI18n(); const salixUrl = ref(); +const { getTokenMultimedia } = useSession(); const entityId = computed(() => { return $props.id || route.params.id; }); +const data = ref(useCardDescription()); +const setData = (entity) => (data.value = useCardDescription(entity.nickname, entity.id)); + const filter = { where: { id: entityId }, fields: ['id', 'nickname', 'name', 'role'], include: { relation: 'role', scope: { fields: ['id', 'name'] } }, }; +function getAccountAvatar() { + const token = getTokenMultimedia(); + return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`; +}