feat(pages): add coauthor to page title (if not null)
This commit is contained in:
parent
f4500d18d9
commit
a82f5bc505
@ -5,6 +5,7 @@
|
||||
import forChapter from "~/components/reviews/forChapter.vue";
|
||||
import storyInfo from "~/components/story/view/storyInfo.vue";
|
||||
import chapterPicker from "~/components/story/view/chapterPicker.vue";
|
||||
import { IUser } from "@models/user";
|
||||
|
||||
const { useToken } = theme;
|
||||
const { token } = useToken();
|
||||
@ -17,8 +18,11 @@
|
||||
console.log("storyyy", story.value?.currentChapter);
|
||||
console.log(rtr);
|
||||
let dark = inject<boolean>("dark");
|
||||
const and = computed(() => {
|
||||
return story.value.coAuthor ? ` and ${story.value.coAuthor.username}` : "";
|
||||
});
|
||||
useHead({
|
||||
title: `"${story.value.title}" by ${story.value.author.username}`,
|
||||
title: `"${story.value.title}" by ${story.value.author.username}${and.value}`,
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
@ -37,7 +41,7 @@
|
||||
<div>
|
||||
<a-typography-title :level="2"> Disclaimer </a-typography-title>
|
||||
<a-divider style="background-color: #fff" />
|
||||
{{ story.author.profile.disclaimer }}
|
||||
{{ (story.author as IUser).profile.disclaimer }}
|
||||
</div>
|
||||
</a-card>
|
||||
<a-typography-title :level="3">
|
||||
|
Loading…
Reference in New Issue
Block a user