Adds brandingStore.

Split userStore into userProfileStore and creatorProfileStore
This commit is contained in:
2024-09-22 02:42:26 -04:00
parent 3cfb3951e3
commit cd51474d08
36 changed files with 458 additions and 639 deletions

View File

@@ -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();