mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	enhance: ユーザーページのノート一覧でRenoteを除外できるように
This commit is contained in:
		
							parent
							
								
									8bc2e6e72e
								
							
						
					
					
						commit
						0e0c61e64a
					
				
					 3 changed files with 17 additions and 4 deletions
				
			
		| 
						 | 
					@ -15,6 +15,7 @@
 | 
				
			||||||
## next
 | 
					## next
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### General
 | 
					### General
 | 
				
			||||||
 | 
					- Enhance: ユーザーページのノート一覧でRenoteを除外できるように
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Client
 | 
					### Client
 | 
				
			||||||
- Enhance: モデレーションログ機能の強化
 | 
					- Enhance: モデレーションログ機能の強化
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,6 +42,7 @@ export const paramDef = {
 | 
				
			||||||
	properties: {
 | 
						properties: {
 | 
				
			||||||
		userId: { type: 'string', format: 'misskey:id' },
 | 
							userId: { type: 'string', format: 'misskey:id' },
 | 
				
			||||||
		includeReplies: { type: 'boolean', default: true },
 | 
							includeReplies: { type: 'boolean', default: true },
 | 
				
			||||||
 | 
							includeRenotes: { type: 'boolean', default: true },
 | 
				
			||||||
		limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
 | 
							limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
 | 
				
			||||||
		sinceId: { type: 'string', format: 'misskey:id' },
 | 
							sinceId: { type: 'string', format: 'misskey:id' },
 | 
				
			||||||
		untilId: { type: 'string', format: 'misskey:id' },
 | 
							untilId: { type: 'string', format: 'misskey:id' },
 | 
				
			||||||
| 
						 | 
					@ -118,6 +119,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
				
			||||||
				query.andWhere('note.replyId IS NULL');
 | 
									query.andWhere('note.replyId IS NULL');
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (ps.includeRenotes === false) {
 | 
				
			||||||
 | 
									query.andWhere(new Brackets(qb => {
 | 
				
			||||||
 | 
										qb.orWhere('note.renoteId IS NULL');
 | 
				
			||||||
 | 
										qb.orWhere(new Brackets(qb => {
 | 
				
			||||||
 | 
											qb.orWhere('note.text IS NOT NULL');
 | 
				
			||||||
 | 
											qb.orWhere('note.fileIds != \'{}\'');
 | 
				
			||||||
 | 
										}));
 | 
				
			||||||
 | 
									}));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (ps.includeMyRenotes === false) {
 | 
								if (ps.includeMyRenotes === false) {
 | 
				
			||||||
				query.andWhere(new Brackets(qb => {
 | 
									query.andWhere(new Brackets(qb => {
 | 
				
			||||||
					qb.orWhere('note.userId != :userId', { userId: user.id });
 | 
										qb.orWhere('note.userId != :userId', { userId: user.id });
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
		<template #header>
 | 
							<template #header>
 | 
				
			||||||
			<MkTab v-model="include" :class="$style.tab">
 | 
								<MkTab v-model="include" :class="$style.tab">
 | 
				
			||||||
				<option :value="null">{{ i18n.ts.notes }}</option>
 | 
									<option :value="null">{{ i18n.ts.notes }}</option>
 | 
				
			||||||
				<option value="replies">{{ i18n.ts.notesAndReplies }}</option>
 | 
									<option value="all">{{ i18n.ts.all }}</option>
 | 
				
			||||||
				<option value="files">{{ i18n.ts.withFiles }}</option>
 | 
									<option value="files">{{ i18n.ts.withFiles }}</option>
 | 
				
			||||||
			</MkTab>
 | 
								</MkTab>
 | 
				
			||||||
		</template>
 | 
							</template>
 | 
				
			||||||
| 
						 | 
					@ -36,7 +36,8 @@ const pagination = {
 | 
				
			||||||
	limit: 10,
 | 
						limit: 10,
 | 
				
			||||||
	params: computed(() => ({
 | 
						params: computed(() => ({
 | 
				
			||||||
		userId: props.user.id,
 | 
							userId: props.user.id,
 | 
				
			||||||
		includeReplies: include.value === 'replies' || include.value === 'files',
 | 
							includeRenotes: include.value === 'all',
 | 
				
			||||||
 | 
							includeReplies: include.value === 'all' || include.value === 'files',
 | 
				
			||||||
		withFiles: include.value === 'files',
 | 
							withFiles: include.value === 'files',
 | 
				
			||||||
	})),
 | 
						})),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -51,7 +52,7 @@ const pagination = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.tl {
 | 
					.tl {
 | 
				
			||||||
	background: var(--bg);
 | 
						background: var(--bg);
 | 
				
			||||||
    border-radius: var(--radius);
 | 
						border-radius: var(--radius);
 | 
				
			||||||
    overflow: clip;
 | 
						overflow: clip;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue