@threenine/nuxstr-comments 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -34,59 +34,63 @@ onMounted(() => {
|
|
|
34
34
|
</UButton>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
|
-
<
|
|
38
|
-
v-if="isLoggedIn"
|
|
39
|
-
class="text-sm text-muted-foreground"
|
|
40
|
-
>
|
|
41
|
-
<PostComment :content-id="contentId" />
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div class="space-y-4">
|
|
37
|
+
<ClientOnly>
|
|
45
38
|
<div
|
|
46
|
-
v-if="
|
|
39
|
+
v-if="isLoggedIn"
|
|
40
|
+
class="text-sm text-muted-foreground"
|
|
47
41
|
>
|
|
48
|
-
<
|
|
42
|
+
<PostComment :content-id="contentId" />
|
|
49
43
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
44
|
+
</ClientOnly>
|
|
45
|
+
<ClientOnly>
|
|
46
|
+
<div class="space-y-4">
|
|
54
47
|
<div
|
|
55
|
-
v-
|
|
56
|
-
:key="c.id"
|
|
57
|
-
class="rounded border p-3 mt-2 mb-2"
|
|
48
|
+
v-if="loading"
|
|
58
49
|
>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
<ScaffoldComment />
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div
|
|
54
|
+
v-else
|
|
55
|
+
class="space-y-6"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
v-for="c in comments"
|
|
59
|
+
:key="c.id"
|
|
60
|
+
class="rounded border p-3 mt-2 mb-2"
|
|
61
|
+
>
|
|
62
|
+
<div class="flex items-center gap-3 mb-3 mt-2">
|
|
63
|
+
<div
|
|
64
|
+
v-if="c.profile?.image"
|
|
65
|
+
class="flex-shrink-0"
|
|
66
|
+
>
|
|
67
|
+
<UAvatar
|
|
68
|
+
:src="c.profile.image"
|
|
69
|
+
:alt="c.profile.name || c.profile.display_name || 'User avatar'"
|
|
70
|
+
class="w-8 h-8 rounded-full object-cover"
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="flex-1 min-w-0">
|
|
74
|
+
<div class="truncate">
|
|
75
|
+
{{ c.profile?.display_name || c.profile?.name || `${c.pubkey.slice(0, 8)}\u2026` }}
|
|
76
|
+
<span class="text-xs">{{ new Date(c.created_at * 1e3).toLocaleString() }}</span>
|
|
77
|
+
</div>
|
|
74
78
|
</div>
|
|
75
79
|
</div>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<div v-html="marked.parse(c.content)" />
|
|
80
|
+
<div class="prose prose-sm prose-invert mt-2 mb-2">
|
|
81
|
+
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
82
|
+
<div v-html="marked.parse(c.content)" />
|
|
80
83
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
84
|
+
</div>
|
|
81
85
|
</div>
|
|
82
|
-
</div>
|
|
83
86
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
<div
|
|
88
|
+
v-if="isLoggedIn"
|
|
89
|
+
class=" mt-5"
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
88
92
|
</div>
|
|
89
|
-
</
|
|
93
|
+
</ClientOnly>
|
|
90
94
|
</div>
|
|
91
95
|
</template>
|
|
92
96
|
|