Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | baf94f86c4 | ||
|   | d36b129369 | ||
|   | f36d88246a | ||
|   | 03f87140b3 | ||
|   | 1dc07f6b72 | 
							
								
								
									
										10
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,6 +1,16 @@ | ||||
| ChangeLog | ||||
| ========= | ||||
|  | ||||
| 11.31.3 (2019/09/03) | ||||
| -------------------- | ||||
| ### 🐛Fixes | ||||
| * 誰がリアクションしたか見れるやつの表示を改善 | ||||
|  | ||||
| 11.31.2 (2019/09/03) | ||||
| -------------------- | ||||
| ### 🐛Fixes | ||||
| * 誰がリアクションしたか見れるやつの表示を改善 | ||||
|  | ||||
| 11.31.1 (2019/09/03) | ||||
| -------------------- | ||||
| ### 🐛Fixes | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| { | ||||
| 	"name": "misskey", | ||||
| 	"author": "syuilo <i@syuilo.com>", | ||||
| 	"version": "11.31.1", | ||||
| 	"version": "11.31.3", | ||||
| 	"codename": "daybreak", | ||||
| 	"repository": { | ||||
| 		"type": "git", | ||||
|   | ||||
| @@ -3,13 +3,16 @@ | ||||
| 		<div class="buebdbiu" ref="popover" v-if="show"> | ||||
| 			<i18n path="few-users" v-if="users.length <= 10"> | ||||
| 				<span slot="users"> | ||||
| 					<mk-user-name v-for="u in users" :user="u" :nowrap="false" :key="u.id"/> | ||||
| 					<b v-for="u in users" :key="u.id" style="margin-right: 8px;"> | ||||
| 						<mk-avatar :user="u" style="width: 24px; height: 24px; margin-right: 2px;"/> | ||||
| 						<mk-user-name :user="u" :nowrap="false" style="line-height: 24px;"/> | ||||
| 					</b> | ||||
| 				</span> | ||||
| 				<mk-reaction-icon slot="reaction" :reaction="reaction" ref="icon" /> | ||||
| 			</i18n> | ||||
| 			<i18n path="many-users" v-if="10 < users.length"> | ||||
| 				<span slot="users">{{ users.slice(0, 10).join(', ') }}</span> | ||||
| 				<span slot="ommited">{{ users.length - 10 }}</span> | ||||
| 				<span slot="ommited">{{ count - 10 }}</span> | ||||
| 				<mk-reaction-icon slot="reaction" :reaction="reaction" ref="icon" /> | ||||
| 			</i18n> | ||||
| 		</div> | ||||
| @@ -31,6 +34,10 @@ export default Vue.extend({ | ||||
| 			type: Array, | ||||
| 			required: true, | ||||
| 		}, | ||||
| 		count: { | ||||
| 			type: Number, | ||||
| 			required: true, | ||||
| 		}, | ||||
| 		source: { | ||||
| 			required: true, | ||||
| 		} | ||||
|   | ||||
| @@ -101,9 +101,11 @@ export default Vue.extend({ | ||||
| 		openDetails() { | ||||
| 			if (this.$root.isMobile) return; | ||||
| 			this.$root.api('notes/reactions', { | ||||
| 				noteId: this.note.id | ||||
| 				noteId: this.note.id, | ||||
| 				type: this.reaction, | ||||
| 				limit: 11 | ||||
| 			}).then((reactions: any[]) => { | ||||
| 				const users = reactions.filter(x => x.type === this.reaction) | ||||
| 				const users = reactions | ||||
| 					.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()) | ||||
| 					.map(x => x.user); | ||||
|  | ||||
| @@ -112,6 +114,7 @@ export default Vue.extend({ | ||||
| 				this.details = this.$root.new(XDetails, { | ||||
| 					reaction: this.reaction, | ||||
| 					users, | ||||
| 					count: this.count, | ||||
| 					source: this.$refs.reaction | ||||
| 				}); | ||||
| 			}); | ||||
|   | ||||
| @@ -4,6 +4,8 @@ import define from '../../define'; | ||||
| import { getNote } from '../../common/getters'; | ||||
| import { ApiError } from '../../error'; | ||||
| import { NoteReactions } from '../../../../models'; | ||||
| import { DeepPartial } from 'typeorm'; | ||||
| import { NoteReaction } from '../../../../models/entities/note-reaction'; | ||||
|  | ||||
| export const meta = { | ||||
| 	desc: { | ||||
| @@ -24,6 +26,10 @@ export const meta = { | ||||
| 			} | ||||
| 		}, | ||||
|  | ||||
| 		type: { | ||||
| 			validator: $.optional.nullable.str, | ||||
| 		}, | ||||
|  | ||||
| 		limit: { | ||||
| 			validator: $.optional.num.range(1, 100), | ||||
| 			default: 10 | ||||
| @@ -70,7 +76,11 @@ export default define(meta, async (ps, user) => { | ||||
|  | ||||
| 	const query = { | ||||
| 		noteId: note.id | ||||
| 	}; | ||||
| 	} as DeepPartial<NoteReaction>; | ||||
|  | ||||
| 	if (ps.type) { | ||||
| 		query.reaction = ps.type; | ||||
| 	} | ||||
|  | ||||
| 	const reactions = await NoteReactions.find({ | ||||
| 		where: query, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user