publication v-1
This commit is contained in:
+26
-10
@@ -55,7 +55,7 @@
|
||||
</p>
|
||||
<div class="thin">
|
||||
<p class="text-[2.836vw] md:text-[0.741vw] text-[#878787]">
|
||||
1402/09/14
|
||||
{{ jDate(item.createdBy.createdAt) }}
|
||||
</p>
|
||||
<p
|
||||
class="w-[98%] text-[3.19vw] md:text-[0.833vw] text-[#383E43] leading-[4.785vw] md:leading-[1.25vw] mt-[2vw] md:mt-[0.5vw]"
|
||||
@@ -67,7 +67,7 @@
|
||||
<div
|
||||
v-for="reply in item.replies"
|
||||
:key="reply.id"
|
||||
class="relative bg-[#F8F8F8] rounded-[3.846vw] md:rounded-[0.781vw] flex justify-between ps-[16vw] md:ps-[0vw] p-[2vw] md:p-[1.55vw]"
|
||||
class="relative bg-[#F8F8F8] rounded-[3.846vw] md:rounded-[0.781vw] flex justify-between p-[2vw] md:p-[1.55vw]"
|
||||
>
|
||||
<img
|
||||
v-if="reply.createdBy.avatarMedia"
|
||||
@@ -87,7 +87,7 @@
|
||||
</p>
|
||||
<div class="thin">
|
||||
<p class="text-[2.836vw] md:text-[0.741vw] text-[#878787]">
|
||||
1402/09/14
|
||||
{{ jDate(reply.createdBy.createdAt) }}
|
||||
</p>
|
||||
<p
|
||||
class="w-[98%] text-[3.19vw] md:text-[0.833vw] text-[#383E43] leading-[4.785vw] md:leading-[1.25vw] mt-[2vw] md:mt-[0.5vw]"
|
||||
@@ -123,7 +123,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<svg
|
||||
<!-- <svg
|
||||
@click="sendReplay(item.id)"
|
||||
class="cursor-pointer absolute md:left-[2vw] left-[5vw] h-[4.615vw] w-[4.615vw] md:h-[1.25vw] md:w-[1.25vw]"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -145,7 +145,7 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</svg> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full md:w-[23.438vw] text-[#383E43]">
|
||||
@@ -162,8 +162,8 @@
|
||||
<div class="space-y-[5vw] md:space-y-[1vw]">
|
||||
<div class="flex gap-[1vw]">
|
||||
<img
|
||||
v-if="authUser?.avatarMedia"
|
||||
:src="authUser.avatarMedia"
|
||||
v-if="authUser?.user.avatarMedia"
|
||||
:src="authUser.user.avatarMedia"
|
||||
alt=""
|
||||
class="h-[8.256vw0] md:h-[3.385vw] w-[10.256vw] md:w-[3.385vw] rounded-[50%]"
|
||||
/>
|
||||
@@ -177,7 +177,7 @@
|
||||
class="space-y-[2vw] mt-[1vw] md:mt-0 ms-[1vw] md:ms-0 md:space-y-0"
|
||||
>
|
||||
<p class="text-[3.59vw] md:text-[0.938vw]">
|
||||
{{ authUser?.name ? authUser.name : "کاربر مهمان" }}
|
||||
{{ authUser?.user.name ? authUser.user.name : "کاربر مهمان" }}
|
||||
</p>
|
||||
<p
|
||||
v-if="replayTarget === null"
|
||||
@@ -223,7 +223,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
if (process.client) {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}
|
||||
import { useToast } from "vue-toastification";
|
||||
import {jDate} from "../../utils/jDate"
|
||||
const toast = useToast();
|
||||
const route = useRoute();
|
||||
const replayTarget = ref(null);
|
||||
@@ -235,13 +243,21 @@ const { data, refresh } = await useFetch("/api/productId", {
|
||||
id: route.params.product,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
const myCourses = await useFetch("/api/auth/me");
|
||||
myCourses.data.value?.course.forEach((element) => {
|
||||
if (element.id === route.params.product) {
|
||||
|
||||
var ids = []
|
||||
myCourses.data.value?.user.course.forEach((element) => {
|
||||
ids.push(element.id)
|
||||
|
||||
|
||||
if (ids.includes(route.params.product)) {
|
||||
access.value = true;
|
||||
} else {
|
||||
access.value = false;
|
||||
}
|
||||
|
||||
});
|
||||
const comment = ref(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user