wip
This commit is contained in:
		
							parent
							
								
									04c246f1d1
								
							
						
					
					
						commit
						5a2bce041c
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,77 @@ | |||
| <!-- | ||||
| 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" class="_ghost"/> | ||||
| 			<div>{{ i18n.ts.noNotes }}</div> | ||||
| 		</div> | ||||
| 	</template> | ||||
| 
 | ||||
| 	<template #default="{ items: notes }"> | ||||
| 		<div :class="[$style.root, { [$style.noGap]: noGap }]"> | ||||
| 			<MkDateSeparatedList | ||||
| 				ref="notes" | ||||
| 				v-slot="{ item: note }" | ||||
| 				:items="notes" | ||||
| 				:direction="pagination.reversed ? 'up' : 'down'" | ||||
| 				:reversed="pagination.reversed" | ||||
| 				:noGap="noGap" | ||||
| 				:ad="ad" | ||||
| 				:class="$style.notes" | ||||
| 			> | ||||
| 				<EmNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note" :withHardMute="true"/> | ||||
| 			</MkDateSeparatedList> | ||||
| 		</div> | ||||
| 	</template> | ||||
| </MkPagination> | ||||
| </template> | ||||
| 
 | ||||
| <script lang="ts" setup> | ||||
| import { shallowRef } from 'vue'; | ||||
| import EmNote from '@/components/EmNote.vue'; | ||||
| import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue'; | ||||
| import MkPagination, { Paging } from '@/components/MkPagination.vue'; | ||||
| import { i18n } from '@/i18n.js'; | ||||
| import { infoImageUrl } from '@/instance.js'; | ||||
| 
 | ||||
| const props = withDefaults(defineProps<{ | ||||
| 	pagination: Paging; | ||||
| 	noGap?: boolean; | ||||
| 	disableAutoLoad?: boolean; | ||||
| 	ad?: boolean; | ||||
| }>(), { | ||||
| 	ad: true, | ||||
| }); | ||||
| 
 | ||||
| const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>(); | ||||
| 
 | ||||
| defineExpose({ | ||||
| 	pagingComponent, | ||||
| }); | ||||
| </script> | ||||
| 
 | ||||
| <style lang="scss" module> | ||||
| .root { | ||||
| 	&.noGap { | ||||
| 		> .notes { | ||||
| 			background: var(--panel); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	&:not(.noGap) { | ||||
| 		> .notes { | ||||
| 			background: var(--bg); | ||||
| 
 | ||||
| 			.note { | ||||
| 				background: var(--panel); | ||||
| 				border-radius: var(--radius); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
|  | @ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only | |||
| 			</div> | ||||
| 		</template> | ||||
| 		<template #body> | ||||
| 			<MkNotes | ||||
| 			<MkEmNotes | ||||
| 				ref="notesEl" | ||||
| 				:pagination="pagination" | ||||
| 				:disableAutoLoad="!embedParams.autoload" | ||||
|  | @ -48,10 +48,11 @@ SPDX-License-Identifier: AGPL-3.0-only | |||
| <script setup lang="ts"> | ||||
| import { ref, computed, shallowRef, inject, onActivated } from 'vue'; | ||||
| import * as Misskey from 'misskey-js'; | ||||
| import MkNotes from '@/components/MkNotes.vue'; | ||||
| import type { Paging } from '@/components/MkPagination.vue'; | ||||
| import type { ParsedEmbedParams } from '@/scripts/embed-page.js'; | ||||
| import MkEmNotes from '@/components/MkEmNotes.vue'; | ||||
| import XNotFound from '@/pages/not-found.vue'; | ||||
| import EmTimelineContainer from '@/embed/components/EmTimelineContainer.vue'; | ||||
| import type { Paging } from '@/components/MkPagination.vue'; | ||||
| import { misskeyApi } from '@/scripts/misskey-api.js'; | ||||
| import { i18n } from '@/i18n.js'; | ||||
| import { instance } from '@/instance.js'; | ||||
|  | @ -60,7 +61,6 @@ import { scrollToTop } from '@/scripts/scroll.js'; | |||
| import { isLink } from '@/scripts/is-link.js'; | ||||
| import { useRouter } from '@/router/supplier.js'; | ||||
| import { defaultEmbedParams } from '@/scripts/embed-page.js'; | ||||
| import type { ParsedEmbedParams } from '@/scripts/embed-page.js'; | ||||
| 
 | ||||
| const props = defineProps<{ | ||||
| 	username: string; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue