diff --git a/source/src/pages/watch.astro b/source/src/pages/watch.astro index 21a9dc0..b06a6f8 100755 --- a/source/src/pages/watch.astro +++ b/source/src/pages/watch.astro @@ -1,15 +1,16 @@ --- -import { t, changeLanguage } from "i18next"; -import Base from "@layouts/Default.astro"; -import "@styles/video.scss"; +import { t, changeLanguage } from "i18next" +import Base from "@layouts/Default.astro" +import "@styles/video.scss" + // Configuration import { DEFAULT_MEDIA_PROXY, DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig' -import { Donate, Download, ShareIos, ThumbsUp, MediaVideo } from "@iconoir/vue"; +import { Donate, Download, ShareIos, ThumbsUp, MediaVideo } from "@iconoir/vue" // Components import Dialog from '@components/Dialog.astro' import Video from '@components/VideoItem.astro' -import Player from "@components/video-player/Player.astro"; +import { Zorn } from "@minpluto/zorn" // Fetch const SWV = Astro.url.href.split("watch?v=").pop(); @@ -21,6 +22,15 @@ const Views = video.viewCount; const VideoSeconds = video.lengthSeconds; let DescriptionFormat = Description.replaceAll("\n", "
"); +var CheckComments = console.log(comments) // If not found, disable comment section + +if (CheckComments = "{ error: 'Comments not found.' }") { + var EnableComments = false +} else { + var EnableComments = true +} + + // Format Published Date const DateFormat = new Date(UploadDate * 1000).toLocaleDateString(); @@ -74,10 +84,12 @@ if (EightK === true) { // 571 --- -
@@ -108,26 +120,24 @@ if (EightK === true) { // 571

{t("WATCH.COMMENTS")}

- { + {EnableComments ? comments.comments.map((comment) => (
- +
-

- {comment.author} - 2 Months - Ago -

+

{comment.author} - 2 Months Ago

{comment.contentHtml}

-

- {comment.likeCount} -

+

{comment.likeCount}

)) + : +

Comments are disabled on this video.

+ }