summaryrefslogtreecommitdiff
path: root/packages/frontend-embed/src/components/EmNotes.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend-embed/src/components/EmNotes.vue')
-rw-r--r--packages/frontend-embed/src/components/EmNotes.vue48
1 files changed, 48 insertions, 0 deletions
diff --git a/packages/frontend-embed/src/components/EmNotes.vue b/packages/frontend-embed/src/components/EmNotes.vue
new file mode 100644
index 0000000000..3970d05098
--- /dev/null
+++ b/packages/frontend-embed/src/components/EmNotes.vue
@@ -0,0 +1,48 @@
+<!--
+SPDX-FileCopyrightText: syuilo and misskey-project
+SPDX-License-Identifier: AGPL-3.0-only
+-->
+
+<template>
+<EmPagination ref="pagingComponent" :pagination="pagination" :disableAutoLoad="disableAutoLoad">
+ <template #empty>
+ <div class="_fullinfo">
+ <div>{{ i18n.ts.noNotes }}</div>
+ </div>
+ </template>
+
+ <template #default="{ items: notes }">
+ <div :class="[$style.root]">
+ <EmNote v-for="note in notes" :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
+ </div>
+ </template>
+</EmPagination>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue';
+import EmNote from '@/components/EmNote.vue';
+import EmPagination, { Paging } from '@/components/EmPagination.vue';
+import { i18n } from '@/i18n.js';
+
+const props = withDefaults(defineProps<{
+ pagination: Paging;
+ noGap?: boolean;
+ disableAutoLoad?: boolean;
+ ad?: boolean;
+}>(), {
+ ad: true,
+});
+
+const pagingComponent = shallowRef<InstanceType<typeof EmPagination>>();
+
+defineExpose({
+ pagingComponent,
+});
+</script>
+
+<style lang="scss" module>
+.root {
+ background: var(--panel);
+}
+</style>