mizzkey/packages/frontend/src/components/MkNotes.vue

69 lines
1.5 KiB
Vue
Raw Normal View History

<template>
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/>
2022-07-20 15:24:26 +02:00
<div>{{ i18n.ts.noNotes }}</div>
2021-04-16 17:12:50 +02:00
</div>
</template>
2021-04-16 17:12:50 +02:00
<template #default="{ items: notes }">
2023-01-10 00:48:37 +01: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 10:25:40 +01:00
<MkDateSeparatedList
ref="notes"
v-slot="{ item: note }"
:items="notes"
:direction="pagination.reversed ? 'up' : 'down'"
:reversed="pagination.reversed"
2023-05-19 06:58:09 +02:00
: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 10:25:40 +01:00
:ad="true"
:class="$style.notes"
>
2023-03-31 07:14:30 +02:00
<MkNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
2023-01-09 21:31:02 +01:00
</MkDateSeparatedList>
2021-04-16 17:12:50 +02:00
</div>
</template>
</MkPagination>
</template>
<script lang="ts" setup>
import { shallowRef } from 'vue';
2023-03-31 07:14:30 +02:00
import MkNote from '@/components/MkNote.vue';
2023-01-09 21:31:02 +01:00
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
2022-07-20 15:24:26 +02:00
import { i18n } from '@/i18n';
import { infoImageUrl } from '@/instance';
const props = defineProps<{
pagination: Paging;
noGap?: boolean;
}>();
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
defineExpose({
pagingComponent,
});
</script>
2021-04-16 17:12:50 +02:00
2023-01-10 00:48:37 +01:00
<style lang="scss" module>
.root {
2021-08-16 08:21:58 +02:00
&.noGap {
> .notes {
background: var(--panel);
}
}
&:not(.noGap) {
> .notes {
2021-08-21 10:40:15 +02:00
background: var(--bg);
2023-01-10 00:48:37 +01:00
.note {
2021-08-16 08:21:58 +02:00
background: var(--panel);
border-radius: var(--radius);
}
}
2021-08-14 15:35:15 +02:00
}
}
2021-04-16 17:12:50 +02:00
</style>