1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-23 11:08:22 +09:00
MisskeyIO/packages/frontend/src/components/MkNotes.vue

68 lines
1.5 KiB
Vue
Raw Normal View History

<template>
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
2022-07-20 22:24:26 +09:00
<div>{{ i18n.ts.noNotes }}</div>
2021-04-17 00:12:50 +09:00
</div>
</template>
2021-04-17 00:12:50 +09:00
<template #default="{ items: notes }">
2023-01-10 08:48:37 +09:00
<div :class="[$style.root, { [$style.noGap]: noGap }]">
refactor: pagination/date-separated-list系処理を良い感じに? (#8209) * pages/messaging/messaging-room.vue * wip * wip * wip??? * wip? * :v: * messaaging-room.form.vue rewrite to compositon api * refactor * 関心事でないのでとりあえず置いておく * :art: * :art: * i18n.ts * fix scroll container find function * fix * FIX * :v: * Fix scroll bottom detect * wip * aaaaaaaaaaa * rename * fix * fix? * :v: * :v: * clean up * clena up * refactor * scroll event once or not * fix * fix once * add safe-area-inset-bottom to spacer * fix * :v: * :art: * fix * fix * wip * :v: * clean up * fix lint * Update packages/client/src/components/global/sticky-container.vue Co-authored-by: Johann150 <johann.galle@protonmail.com> * Update packages/client/src/components/ui/pagination.vue Co-authored-by: Johann150 <johann.galle@protonmail.com> * Update packages/client/src/pages/messaging/messaging-room.form.vue Co-authored-by: Johann150 <johann.galle@protonmail.com> * clean up: single line comment * https://github.com/misskey-dev/misskey/pull/8209#discussion_r867386077 * fix * asobi → tolerance * pick form * pick message * pick room * fix lint * fix scroll? * fix scroll.ts * fix directives/sticky-container * update global/sticky-container.vue * fix, :art: * revert merge * :v: * fix lint errors * :art: * Update packages/client/src/types/date-separated-list.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * https://github.com/misskey-dev/misskey/pull/8209#discussion_r917225080 * use ' * Update packages/client/src/scripts/scroll.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * use Number.EPSILON Co-authored-by: acid-chicken <root@acid-chicken.com> * revert * fix * fix * Use % instead of vh * :art: * :art: * :art: * wip * wip * css modules Co-authored-by: Johann150 <johann.galle@protonmail.com> Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2023-01-13 18:25:40 +09:00
<MkDateSeparatedList
ref="notes"
v-slot="{ item: note }"
:items="notes"
:direction="pagination.reversed ? 'up' : 'down'"
:reversed="pagination.reversed"
:no-gap="noGap"
:ad="true"
:class="$style.notes"
>
2023-01-10 08:48:37 +09:00
<XNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
2023-01-10 05:31:02 +09:00
</MkDateSeparatedList>
2021-04-17 00:12:50 +09:00
</div>
</template>
</MkPagination>
</template>
<script lang="ts" setup>
import { shallowRef } from 'vue';
import XNote from '@/components/MkNote.vue';
2023-01-10 05:31:02 +09:00
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
2022-07-20 22:24:26 +09:00
import { i18n } from '@/i18n';
const props = defineProps<{
pagination: Paging;
noGap?: boolean;
}>();
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
defineExpose({
pagingComponent,
});
</script>
2021-04-17 00:12:50 +09:00
2023-01-10 08:48:37 +09:00
<style lang="scss" module>
.root {
2021-08-16 15:21:58 +09:00
&.noGap {
> .notes {
background: var(--panel);
}
}
&:not(.noGap) {
> .notes {
2021-08-21 17:40:15 +09:00
background: var(--bg);
2023-01-10 08:48:37 +09:00
.note {
2021-08-16 15:21:58 +09:00
background: var(--panel);
border-radius: var(--radius);
}
}
2021-08-14 22:35:15 +09:00
}
}
2021-04-17 00:12:50 +09:00
</style>