-
-
-
-
- reblogged
-
+ :class="['relative flex flex-col', borders && 'first:rounded-t last:rounded-b ring-1 ring-white/5', background && 'bg-dark-800 hover:bg-dark-700 duration-200']">
+
-
+
-
-
-
-
-
@@ -29,17 +46,27 @@ import Skeleton from "~/components/skeleton/Skeleton.vue";
import Header from "./header.vue";
import InteractionRow from "./interactions/row.vue";
import NoteContent from "./note-content.vue";
-import ReplyHeader from "./reply-header.vue";
const props = withDefaults(
defineProps<{
- element?: Status;
+ element?: MaybeRef;
small?: boolean;
disabled?: boolean;
showInteractions?: boolean;
+ threadView?: boolean;
+ threadViewTop?: boolean;
+ renderReplies?: boolean;
+ padding?: boolean;
+ borders?: boolean;
+ background?: boolean;
}>(),
{
showInteractions: true,
+ padding: true,
+ borders: true,
+ renderReplies: true,
+ background: true,
+ threadViewTop: true,
},
);
@@ -63,4 +90,9 @@ const {
isReply,
reblogDisplayName,
} = useNoteData(noteRef, client, settings);
+
+const inReplyToId = computed(
+ () => outputtedNote?.value?.in_reply_to_id ?? null,
+);
+const reply = useNote(client, inReplyToId);
\ No newline at end of file
diff --git a/composables/Note.ts b/composables/Note.ts
index c5ab14a..d6b5dcd 100644
--- a/composables/Note.ts
+++ b/composables/Note.ts
@@ -1,18 +1,24 @@
import type { Client } from "@versia/client";
import type { Status } from "@versia/client/types";
-export const useNote = (client: MaybeRef, noteId: string) => {
- if (!ref(client).value) {
+export const useNote = (
+ client: MaybeRef,
+ noteId: MaybeRef,
+) => {
+ if (!(toValue(client) && toValue(noteId))) {
return ref(null as Status | null);
}
const output = ref(null as Status | null);
- ref(client)
- .value?.getStatus(noteId)
- .then((res) => {
- output.value = res.data;
- });
+ watchEffect(() => {
+ toValue(noteId) &&
+ toValue(client)
+ ?.getStatus(toValue(noteId) as string)
+ .then((res) => {
+ output.value = res.data;
+ });
+ });
return output;
};
diff --git a/pages/[username]/[uuid].vue b/pages/[username]/[uuid].vue
index 60a5ccc..8d89906 100644
--- a/pages/[username]/[uuid].vue
+++ b/pages/[username]/[uuid].vue
@@ -1,10 +1,10 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reblogged
+
+
+
+
+
-
+
+
-
+
-