diff --git a/src/client/components/note.sub.vue b/src/client/components/note.sub.vue index 5efbb8f1e..fcdb06bd9 100644 --- a/src/client/components/note.sub.vue +++ b/src/client/components/note.sub.vue @@ -1,18 +1,21 @@ @@ -23,6 +26,8 @@ import XSubNoteContent from './sub-note-content.vue'; import XCwButton from './cw-button.vue'; export default Vue.extend({ + name: 'x-sub', + components: { XNoteHeader, XSubNoteContent, @@ -34,6 +39,16 @@ export default Vue.extend({ type: Object, required: true }, + detail: { + type: Boolean, + required: false, + default: false + }, + children: { + type: Boolean, + required: false, + default: false + }, // TODO truncate: { type: Boolean, @@ -41,23 +56,28 @@ export default Vue.extend({ } }, - inject: { - narrow: { - default: false - } - }, - data() { return { - showContent: false + showContent: false, + replies: [], }; - } + }, + + created() { + if (this.detail) { + this.$root.api('notes/children', { + noteId: this.note.id, + limit: 5 + }).then(replies => { + this.replies = replies; + }); + } + }, }); diff --git a/src/client/components/note.vue b/src/client/components/note.vue index 619d1a5b0..ec31a5f99 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -79,7 +79,7 @@
{{ $t('deleted') }}
- +