# Conflicts: # .github/workflows/api-misskey-js.yml # .github/workflows/changelog-check.yml # .github/workflows/check-misskey-js-autogen.yml # .github/workflows/get-api-diff.yml # .github/workflows/lint.yml # .github/workflows/locale.yml # .github/workflows/on-release-created.yml # .github/workflows/storybook.yml # .github/workflows/test-backend.yml # .github/workflows/test-federation.yml # .github/workflows/test-frontend.yml # .github/workflows/test-misskey-js.yml # .github/workflows/test-production.yml # .github/workflows/validate-api-json.yml # package.json # packages/backend/package.json # packages/backend/src/server/api/ApiCallService.ts # packages/backend/src/server/api/endpoints/drive/files/create.ts # packages/frontend-shared/js/url.ts # packages/frontend/package.json # packages/frontend/src/components/MkFileCaptionEditWindow.vue # packages/frontend/src/components/MkInfo.vue # packages/frontend/src/components/MkLink.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkNotes.vue # packages/frontend/src/components/MkPageWindow.vue # packages/frontend/src/components/MkReactionsViewer.vue # packages/frontend/src/components/MkTimeline.vue # packages/frontend/src/components/MkUrlPreview.vue # packages/frontend/src/components/MkUserPopup.vue # packages/frontend/src/components/global/MkPageHeader.vue # packages/frontend/src/components/global/MkUrl.vue # packages/frontend/src/components/global/PageWithHeader.vue # packages/frontend/src/pages/about-misskey.vue # packages/frontend/src/pages/announcements.vue # packages/frontend/src/pages/antenna-timeline.vue # packages/frontend/src/pages/channel.vue # packages/frontend/src/pages/instance-info.vue # packages/frontend/src/pages/note.vue # packages/frontend/src/pages/page.vue # packages/frontend/src/pages/role.vue # packages/frontend/src/pages/tag.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user-list-timeline.vue # packages/frontend/src/pages/user/followers.vue # packages/frontend/src/pages/user/following.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/pages/user/index.vue # packages/frontend/src/ui/deck.vue # packages/misskey-js/generator/package.json # pnpm-lock.yaml # scripts/changelog-checker/package-lock.json # scripts/changelog-checker/package.json
90 lines
2.3 KiB
Vue
90 lines
2.3 KiB
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<MkPagination ref="pagingComponent" :pagination="pagination" :disableAutoLoad="disableAutoLoad">
|
|
<template #empty>
|
|
<div class="_fullinfo">
|
|
<img :src="infoImageUrl" draggable="false"/>
|
|
<div>{{ i18n.ts.noNotes }}</div>
|
|
</div>
|
|
</template>
|
|
|
|
<template #default="{ items: notes }">
|
|
<div :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]">
|
|
<template v-for="(note, i) in notes" :key="note.id">
|
|
<div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]" :data-scroll-anchor="note.id">
|
|
<DynamicNote :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true"/>
|
|
<div :class="$style.ad">
|
|
<MkAd :preferForms="['horizontal', 'horizontal-big']"/>
|
|
</div>
|
|
</div>
|
|
<DynamicNote v-else :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true" :data-scroll-anchor="note.id"/>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
</MkPagination>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import * as Misskey from 'misskey-js';
|
|
import { useTemplateRef } from 'vue';
|
|
import type { Paging } from '@/components/MkPagination.vue';
|
|
import DynamicNote from '@/components/DynamicNote.vue';
|
|
import MkPagination from '@/components/MkPagination.vue';
|
|
import { i18n } from '@/i18n.js';
|
|
import { infoImageUrl } from '@/instance.js';
|
|
|
|
const props = defineProps<{
|
|
pagination: Paging;
|
|
noGap?: boolean;
|
|
disableAutoLoad?: boolean;
|
|
}>();
|
|
|
|
const pagingComponent = useTemplateRef('pagingComponent');
|
|
|
|
defineExpose({
|
|
pagingComponent,
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
.reverse {
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.root {
|
|
container-type: inline-size;
|
|
|
|
&.noGap {
|
|
background: var(--MI_THEME-panel);
|
|
|
|
.note {
|
|
border-bottom: solid 0.5px var(--MI_THEME-divider);
|
|
}
|
|
|
|
.ad {
|
|
padding: 8px;
|
|
background-size: auto auto;
|
|
background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--MI_THEME-bg) 8px, var(--MI_THEME-bg) 14px);
|
|
border-bottom: solid 0.5px var(--MI_THEME-divider);
|
|
}
|
|
}
|
|
|
|
&:not(.noGap) {
|
|
background: var(--MI_THEME-bg);
|
|
|
|
.note {
|
|
background: var(--MI_THEME-panel);
|
|
border-radius: var(--MI-radius);
|
|
}
|
|
}
|
|
}
|
|
|
|
.ad:empty {
|
|
display: none;
|
|
}
|
|
</style>
|