@@ -11,9 +11,11 @@ import {
11
11
EyeIcon ,
12
12
EllipsisVerticalIcon ,
13
13
PaperClipIcon ,
14
+ HeartIcon ,
14
15
} from " @heroicons/vue/24/solid" ;
15
16
import BBReply from " ./BBReply.vue" ;
16
- import BBReplies from " ./BBReplies.vue" ;
17
+ import BBRepliesClassic from " ./BBRepliesClassic.vue" ;
18
+ import RepliesClassic from " ./RepliesClassic.vue" ;
17
19
import { useBBStore } from " ./bbStore" ;
18
20
19
21
const md = markdownit ();
@@ -115,7 +117,12 @@ watch(isAuth, () => {
115
117
});
116
118
onMounted (() => {
117
119
mounted .value = true ;
118
- if (isAuth .value && props .isSingle ) {
120
+ if (
121
+ isAuth .value &&
122
+ props .isSingle &&
123
+ userMenu .value &&
124
+ userMenuButton .value
125
+ ) {
119
126
useMenuInstance .value = new Dropdown (userMenu .value , userMenuButton .value , {
120
127
offsetDistance: - 5 ,
121
128
});
@@ -129,8 +136,10 @@ onMounted(() => {
129
136
:to =" isSingle ? undefined : `/forums/${$route.params.uuid}/${post.Slug}`"
130
137
class =" gap-1 bb-container-base !rounded-none block"
131
138
:itemid =" `/forums/${$route.params.uuid}/${post.Slug}`"
132
- itemscope
133
- itemtype =" https://schema.org/DiscussionForumPosting"
139
+ :itemscope =" isSingle ? true : undefined"
140
+ :itemtype ="
141
+ isSingle ? 'https://schema.org/DiscussionForumPosting' : undefined
142
+ "
134
143
:class =" {
135
144
'!border-b-0': !isSingle && idx !== total,
136
145
'bb-data': !isSingle,
@@ -319,7 +328,7 @@ onMounted(() => {
319
328
}}
320
329
</div >
321
330
<div class =" flex gap-2 lg:w-full justify-start items-center" >
322
- <ChatBubbleLeftRightIcon class =" w-4 h-4" />
331
+ <HeartIcon class =" w-4 h-4" />
323
332
{{ $t("bb_user_likes", { count: post.User.ForumsLikesCount }) }}
324
333
</div >
325
334
<div class =" flex gap-2 lg:w-full justify-start items-center" >
@@ -486,24 +495,63 @@ onMounted(() => {
486
495
</span >
487
496
</div >
488
497
</RouterLink >
498
+ <div >•</div >
499
+ <div itemprop =" datePublished" >
500
+ <time :datetime =" post.CreatedAt.iso" >{{
501
+ $formatDate(post.CreatedAt.iso)
502
+ }}</time >
503
+ </div >
489
504
</div >
490
505
</div >
491
506
</div >
492
- <h2 class =" h3 px-1 mt-5" >
493
- {{
494
- $t("bb_comment", {
495
- count: post.ReplyCount ? post.ReplyCount : 0,
496
- })
497
- }}
498
- </h2 >
499
- <div v-if =" isSingle" class =" px-2 bb-data !rounded-none mt-3" >
500
- <BBReply v-if =" isSingle" :post =" post" :posts =" posts" />
501
507
502
- <BBReplies :post =" post" />
508
+ <div id =" replies" >
509
+ <BBRepliesClassic
510
+ v-if =" isSingle"
511
+ :post =" post"
512
+ :posts =" posts"
513
+ :rank-component =" rankComponent"
514
+ :avatar-component =" avatarComponent"
515
+ />
516
+ </div >
517
+ <!--
518
+ <div v-if="isSingle" class="px-2 bb-data !rounded-none mt-3">
519
+ <BBReplies :post="post" />
503
520
</div>
521
+ -->
504
522
</template >
505
523
<template v-else >
506
- <div class =" flex gap-2 items-center py-1.5" >
524
+ <article
525
+ class =" flex gap-2 items-center py-1.5"
526
+ itemtype =" https://schema.org/DiscussionForumPosting"
527
+ itemscope
528
+ >
529
+ <meta
530
+ itemprop =" url"
531
+ :content =" `/forums/${$route.params.uuid}/${post.Slug}`"
532
+ />
533
+ <meta itemprop =" headline" :content =" post.Title" />
534
+ <meta
535
+ v-if =" post.PostType === 3"
536
+ itemprop =" image"
537
+ :content =" post.LinkData"
538
+ />
539
+ <meta
540
+ v-else-if =" post.LinkType === 'yt'"
541
+ itemprop =" video"
542
+ :content =" `https://www.youtube.com/embed/${post.LinkData}`"
543
+ />
544
+ <meta v-else itemprop =" articleBody" :content =" post.Message" />
545
+ <meta itemprop =" datePublished" :content =" post.CreatedAt.iso" />
546
+ <div
547
+ class =" absolute opacity-0 w-0 h-0 overflow-hidden"
548
+ itemprop =" author"
549
+ itemscope
550
+ itemtype =" https://schema.org/Person"
551
+ >
552
+ <meta itemprop =" name" :content =" post.User.UserProfile.Username" />
553
+ </div >
554
+
507
555
<div class =" flex items-center justify-center pl-3 pr-1" >
508
556
<component
509
557
:is =" avatarComponent"
@@ -528,7 +576,7 @@ onMounted(() => {
528
576
'h3 gap-2 items-center flex ': !isSingle,
529
577
}"
530
578
>
531
- <span itemprop = " headline " >{{ post.Title }}</span >
579
+ <span >{{ post.Title }}</span >
532
580
533
581
<div class =" hidden lg:flex items-center gap-1" >
534
582
<span
@@ -578,21 +626,16 @@ onMounted(() => {
578
626
<div class =" mt-0" >
579
627
<div class =" text-white/[.5] text-xs" >
580
628
Posted by
581
- <span
582
- itemprop =" author"
583
- itemscope
584
- itemtype =" https://schema.org/Person"
585
- >
586
- <b itemprop =" name"
587
- >@{{
588
- post.User?.UserProfile?.Username
589
- ? post.User.UserProfile.Username
590
- : "Anonymous"
591
- }}</b
592
- >
629
+ <span itemtype =" https://schema.org/Person" itemprop =" author" >
630
+ <b itemprop =" name" >{{
631
+ post.User?.UserProfile?.Username
632
+ ? post.User.UserProfile.Username
633
+ : "Anonymous"
634
+ }}</b >
593
635
</span >
636
+
594
637
on
595
- <time itemprop = " datePublished " :datetime =" post.CreatedAt.iso" >{{
638
+ <time :datetime =" post.CreatedAt.iso" >{{
596
639
$formatDate(post.CreatedAt.iso)
597
640
}}</time
598
641
>.
@@ -715,14 +758,21 @@ onMounted(() => {
715
758
</div >
716
759
</RouterLink >
717
760
</div >
718
- <div class =" hidden lg:flex gap-4 items-center pr-3 w-44" >
761
+ <div
762
+ class =" hidden lg:flex gap-4 items-center justify-between pr-3 w-44"
763
+ >
719
764
<div v-if =" post.LastReplyID" class =" text-sm" >
720
- {{ $formatTimeago(post.LastReply.CreatedAt.unixms) }}<br />
721
- @{{
722
- post.LastReply.User?.UserProfile?.Username
723
- ? post.LastReply.User.UserProfile.Username
724
- : "Anonymous"
725
- }}
765
+ <span itemprop =" dateModified" >
766
+ {{ $formatTimeago(post.LastReply.CreatedAt.unixms) }}
767
+ </span >
768
+ <br />
769
+ <span >
770
+ @{{
771
+ post.LastReply.User?.UserProfile?.Username
772
+ ? post.LastReply.User.UserProfile.Username
773
+ : "Anonymous"
774
+ }}</span
775
+ >
726
776
</div >
727
777
<component
728
778
:is =" avatarComponent"
@@ -733,8 +783,7 @@ onMounted(() => {
733
783
: post.LastReply.User.UUID
734
784
"
735
785
:user =" post.LastReply.User"
736
- class =" w-10 h-10"
737
- cls =" w-10 h-10"
786
+ class =" w-10 h-10 shrink-0 grow-0"
738
787
/>
739
788
<div
740
789
v-if =" !post.LastReplyID"
@@ -743,7 +792,7 @@ onMounted(() => {
743
792
n/a
744
793
</div >
745
794
</div >
746
- </div >
795
+ </article >
747
796
</template >
748
797
</component >
749
798
</template >
0 commit comments