summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorShittyKopper <shittykopper@w.on-t.work>2023-12-07 16:54:31 +0300
committerdakkar <dakkar@thenautilus.net>2023-12-08 11:35:26 +0000
commit05166f79e119023420d5f77720defaf07a9c2000 (patch)
treeb1d6cbb333c324ad8ba80c24529ca84c49a0eebe /packages/frontend/src/components
parentfix: tini location (diff)
downloadsharkey-05166f79e119023420d5f77720defaf07a9c2000.tar.gz
sharkey-05166f79e119023420d5f77720defaf07a9c2000.tar.bz2
sharkey-05166f79e119023420d5f77720defaf07a9c2000.zip
upd: add option for reply depth
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkNoteSub.vue5
-rw-r--r--packages/frontend/src/components/SkNoteSub.vue5
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue
index 384a85e546..5b1e1af308 100644
--- a/packages/frontend/src/components/MkNoteSub.vue
+++ b/packages/frontend/src/components/MkNoteSub.vue
@@ -64,7 +64,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</footer>
</div>
</div>
- <template v-if="depth < 5">
+ <template v-if="depth < numberOfReplies">
<MkNoteSub v-for="reply in replies" :key="reply.id" :note="reply" :class="$style.reply" :detail="true" :depth="depth + 1" :expandAllCws="props.expandAllCws"/>
</template>
<div v-else :class="$style.more">
@@ -124,6 +124,7 @@ const translation = ref<any>(null);
const translating = ref(false);
const isDeleted = ref(false);
const renoted = ref(false);
+const numberOfReplies = ref(defaultStore.state.numberOfReplies);
const reactButton = shallowRef<HTMLElement>();
const renoteButton = shallowRef<HTMLElement>();
const quoteButton = shallowRef<HTMLElement>();
@@ -390,7 +391,7 @@ function menu(viaKeyboard = false): void {
if (props.detail) {
os.api('notes/children', {
noteId: props.note.id,
- limit: 5,
+ limit: numberOfReplies.value,
showQuotes: false,
}).then(res => {
replies = res;
diff --git a/packages/frontend/src/components/SkNoteSub.vue b/packages/frontend/src/components/SkNoteSub.vue
index 64c71efd4e..dd4abe8f58 100644
--- a/packages/frontend/src/components/SkNoteSub.vue
+++ b/packages/frontend/src/components/SkNoteSub.vue
@@ -72,7 +72,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</footer>
</div>
</div>
- <template v-if="depth < 5">
+ <template v-if="depth < numberOfReplies">
<SkNoteSub v-for="reply in replies" :key="reply.id" :note="reply" :class="[$style.reply, { [$style.single]: replies.length === 1 }]" :detail="true" :depth="depth + 1" :expandAllCws="props.expandAllCws"/>
</template>
<div v-else :class="$style.more">
@@ -133,6 +133,7 @@ const translation = ref<any>(null);
const translating = ref(false);
const isDeleted = ref(false);
const renoted = ref(false);
+const numberOfReplies = ref(defaultStore.state.numberOfReplies);
const reactButton = shallowRef<HTMLElement>();
const renoteButton = shallowRef<HTMLElement>();
const quoteButton = shallowRef<HTMLElement>();
@@ -399,7 +400,7 @@ function menu(viaKeyboard = false): void {
if (props.detail) {
os.api('notes/children', {
noteId: props.note.id,
- limit: 5,
+ limit: numberOfReplies.value,
showQuotes: false,
}).then(res => {
replies = res;