Add old post type and possibility to change BG color

This commit is contained in:
Dominic Villemure
2024-10-12 18:10:26 -04:00
parent 006db49cf7
commit ee3b594594
4 changed files with 71 additions and 16 deletions

View File

@@ -1,7 +1,11 @@
<template>
<div class="w-full h-full">
<v-btn class="flex justify-end" @click="createHtmlContent">Create Custom</v-btn>
<v-btn class="flex justify-end" @click="createContent">Create</v-btn>
<div v-if="creatorIsCurrentUser" class="flex space-x-4">
<publish-content-button></publish-content-button>
<v-btn icon @click="createHtmlContent">
<v-icon>mdi-pencil</v-icon>
</v-btn>
</div>
<div v-if="brandingStore.value.loading">
<v-progress-linear indeterminate></v-progress-linear>
</div>
@@ -16,9 +20,15 @@
import {useBrandingStore} from "@/stores/brandingStore.js";
import ContentList from "@/views/contents/ContentList.vue";
import {useRouter} from "vue-router";
import PublishContentButton from "@/views/contents/PublishContentButton.vue";
import {computed} from "vue";
import {useAuthStore} from "@/stores/authStore.js";
const brandingStore = useBrandingStore()
const authStore = useAuthStore();
const router = useRouter();
const creatorIsCurrentUser = computed(() => authStore.isAuthenticated && authStore.userId === brandingStore.value.id);
const createHtmlContent = () => {
router.push('/content/editor');
}