Adds brandingStore.
Split userStore into userProfileStore and creatorProfileStore
This commit is contained in:
@@ -97,10 +97,10 @@
|
||||
<template v-slot:activator="{ props }">
|
||||
<div v-bind="props" class="flex align-center font-sans py-1 px-2 rounded-lg hover:bg-gray-100">
|
||||
<span class="max-w-xs hidden md:block capitalize">
|
||||
{{ userStore.alias }}
|
||||
{{ userProfileStore.alias }}
|
||||
</span>
|
||||
<img
|
||||
:src="userStore.portraitUrl"
|
||||
:src="userProfileStore.portraitUrl"
|
||||
alt="Profile Image"
|
||||
class="ml-2 rounded-full"
|
||||
width="32"
|
||||
@@ -119,13 +119,13 @@
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<v-list-item v-if="userStore.creator && Object.keys(userStore.creator).length > 0" class="nav-button">
|
||||
<router-link :to="`/@${userStore.creator.name}`">
|
||||
<v-btn class="w-100" variant="plain">@{{ userStore.creator.name }}</v-btn>
|
||||
<v-list-item v-if="creatorProfileStore.value && Object.keys(creatorProfileStore.value).length > 0" class="nav-button">
|
||||
<router-link :to="`/@${creatorProfileStore.value.name}`">
|
||||
<v-btn class="w-100" variant="plain">@{{ creatorProfileStore.value.name }}</v-btn>
|
||||
</router-link>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item v-if="!userStore.hasCreator" class="nav-button">
|
||||
<v-list-item v-if="!creatorProfileStore.hasCreator" class="nav-button">
|
||||
<router-link to="/profile?target=CreatorPage">
|
||||
<v-btn class="w-100" variant="plain">Activer votre page</v-btn>
|
||||
</router-link>
|
||||
@@ -158,12 +158,16 @@
|
||||
import { ref, onBeforeUnmount, onBeforeMount, watch } from "vue";
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useSideBarStore } from '@/stores/sideBarStore.js';
|
||||
import { useUserStore } from "@/stores/userStore.js";
|
||||
|
||||
import { useAuthStore } from "@/stores/authStore.js";
|
||||
import { useDisplay } from 'vuetify';
|
||||
import {useUserProfileStore} from "@/stores/userProfileStore.js";
|
||||
import {useCreatorProfileStore} from "@/stores/creatorProfileStore.js";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const userStore = useUserStore();
|
||||
const userProfileStore = useUserProfileStore();
|
||||
const creatorProfileStore = useCreatorProfileStore();
|
||||
|
||||
const sideBarStore = useSideBarStore();
|
||||
const { smAndDown } = useDisplay();
|
||||
|
||||
|
||||
@@ -63,9 +63,6 @@ initializeLocale();
|
||||
</div>
|
||||
|
||||
<subscription-list>
|
||||
<template v-slot:default>
|
||||
<span v-if="subscriptionListIsEmpty">Aucun abonnement</span>
|
||||
</template>
|
||||
</subscription-list>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<script async setup>
|
||||
import { onBeforeMount, ref, computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import {useUserStore} from "@/stores/userStore.js";
|
||||
import {useUserProfileStore} from "@/stores/userProfileStore.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userProfileStore = useUserProfileStore();
|
||||
const router = useRouter();
|
||||
|
||||
const userTransactions = ref([]);
|
||||
@@ -72,8 +72,8 @@ const transactionCount = computed(() => userTransactions.value.length);
|
||||
|
||||
onBeforeMount( () => {
|
||||
try {
|
||||
userTransactions.value = userStore.user.userTransactions;
|
||||
totalBalance.value = userStore.user.totalBalance;
|
||||
userTransactions.value = userProfileStore.value.userTransactions;
|
||||
totalBalance.value = userProfileStore.value.totalBalance;
|
||||
} catch (error) {
|
||||
navigateToHome();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user