Merged PR 137: ContentEditor into main
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<div class="w-full h-full">
|
||||
<div class="w-full h-full">
|
||||
<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>
|
||||
@@ -13,5 +19,22 @@
|
||||
<script async setup>
|
||||
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');
|
||||
}
|
||||
|
||||
const createContent = () => {
|
||||
router.push('/content/post');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<template>
|
||||
|
||||
<div class="flex flex-col min-h-screen max-w-[1500px] mx-auto">
|
||||
|
||||
<div v-if="brandingStore.loading">
|
||||
<v-progress-linear indeterminate></v-progress-linear>
|
||||
</div>
|
||||
<div v-else>
|
||||
<creator-banner></creator-banner>
|
||||
</div>
|
||||
|
||||
<div class="py-8 flex-grow">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user