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