mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
style: 🎨 Run Biome
This commit is contained in:
parent
83ff97d7ff
commit
7461478170
|
|
@ -114,18 +114,18 @@ const mentions = await useResolveMentions(
|
|||
);
|
||||
const eventualReblogAccountName = props.note?.reblog
|
||||
? useParsedContent(
|
||||
props.note?.account.display_name,
|
||||
props.note?.account.emojis,
|
||||
mentions.value,
|
||||
).value
|
||||
props.note?.account.display_name,
|
||||
props.note?.account.emojis,
|
||||
mentions.value,
|
||||
).value
|
||||
: null;
|
||||
const content =
|
||||
note.value && process.client
|
||||
? useParsedContent(
|
||||
note.value.content,
|
||||
note.value.emojis,
|
||||
mentions.value,
|
||||
)
|
||||
note.value.content,
|
||||
note.value.emojis,
|
||||
mentions.value,
|
||||
)
|
||||
: "";
|
||||
const numberFormat = (number = 0) =>
|
||||
new Intl.NumberFormat(undefined, {
|
||||
|
|
@ -141,7 +141,7 @@ const deleteNote = async () => {
|
|||
|
||||
if (result?.data) {
|
||||
console.log("Status deleted", result.data);
|
||||
emits('delete')
|
||||
emits("delete");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from '~/types/mastodon/status';
|
||||
import type { Status } from "~/types/mastodon/status";
|
||||
|
||||
const props = defineProps<{
|
||||
timeline: Status[];
|
||||
|
|
@ -52,13 +52,19 @@ useIntervalFn(() => {
|
|||
props.loadPrev();
|
||||
}, 5000);
|
||||
|
||||
watch(() => props.timeline, (newTimeline, oldTimeline) => {
|
||||
// If posts are deleted, don't start loading more posts
|
||||
if (newTimeline.length === oldTimeline.length - 1) return;
|
||||
isLoading.value = false;
|
||||
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
|
||||
if (newTimeline.length - oldTimeline.length < useConfig().NOTES_PER_PAGE) {
|
||||
hasReachedEnd.value = true;
|
||||
}
|
||||
});
|
||||
watch(
|
||||
() => props.timeline,
|
||||
(newTimeline, oldTimeline) => {
|
||||
// If posts are deleted, don't start loading more posts
|
||||
if (newTimeline.length === oldTimeline.length - 1) return;
|
||||
isLoading.value = false;
|
||||
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
|
||||
if (
|
||||
newTimeline.length - oldTimeline.length <
|
||||
useConfig().NOTES_PER_PAGE
|
||||
) {
|
||||
hasReachedEnd.value = true;
|
||||
}
|
||||
},
|
||||
);
|
||||
</script>
|
||||
Loading…
Reference in a new issue