Compare commits

..

14 Commits

Author SHA1 Message Date
baf94f86c4 11.31.3 2019-09-03 07:28:45 +09:00
d36b129369 Improve reaction tooltip 2019-09-03 07:25:02 +09:00
f36d88246a Fetch more reactins 2019-09-03 07:15:53 +09:00
03f87140b3 11.31.2 2019-09-03 06:58:19 +09:00
1dc07f6b72 🎨 2019-09-03 06:58:01 +09:00
0aa0a9d24b 11.31.1 2019-09-03 06:22:05 +09:00
a9a93db2b4 Update reactions-viewer.reaction.vue 2019-09-03 06:20:52 +09:00
f187df3933 Update reactions-viewer.reaction.vue 2019-09-03 06:20:04 +09:00
8abe8042d7 Fix bug 2019-09-03 06:19:17 +09:00
58fd46ff6f 🎨 2019-09-03 06:00:45 +09:00
fef8b662c1 🎨 2019-09-03 05:50:01 +09:00
8de2f4ce76 Update node to 12.9.1 2019-09-03 05:43:44 +09:00
e5e344e1cd Update README.md [AUTOGEN] (#5382) 2019-09-03 01:02:57 +09:00
e70d7edf41 Fix #5380 (#5381) 2019-09-02 07:01:33 +09:00
8 changed files with 69 additions and 12 deletions

View File

@ -1 +1 @@
v12.8.1
v12.9.1

View File

@ -1,6 +1,21 @@
ChangeLog
=========
11.31.3 (2019/09/03)
--------------------
### 🐛Fixes
* 誰がリアクションしたか見れるやつの表示を改善
11.31.2 (2019/09/03)
--------------------
### 🐛Fixes
* 誰がリアクションしたか見れるやつの表示を改善
11.31.1 (2019/09/03)
--------------------
### 🐛Fixes
* 誰がリアクションしたか見れるやつの表示を改善
11.31.0 (2019/09/02)
--------------------
### ✨Improvements

View File

@ -1,4 +1,4 @@
FROM node:12.8-alpine AS base
FROM node:12.9.1-alpine AS base
ENV NODE_ENV=production

View File

@ -155,15 +155,17 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/4503830/ccf2cc867ea64de0b524bb2e24b9a1cb/1.jpeg?token-time=2145916800&token-hash=L55UhJ0rcuNAH3w_ryeeGN4hC6taoOixyAhraEi0bzw%3D" alt="dansup" width="100"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/619786/32cf01444db24e578cd1982c197f6fc6/1.jpeg?token-time=2145916800&token-hash=d8jBQLMOHD87KtXs5C9fk1o58DMF73pQ-dYH3uZJPBE%3D" alt="Gargron" width="100"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5731881/4b6038e6cda34c04b83a5fcce3806a93/1.png?token-time=2145916800&token-hash=hBayGfOmQH3kRMdNnDe4oCZD_9fsJWSt29xXR3KRMVk%3D" alt="Nokotaro Takeda" width="100"></td>
<td><img src="https://c8.patreon.com/2/200/23932002" alt="nenohi" width="100"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12531784/93a45137841849329ba692da92ac7c60/1.jpeg?token-time=2145916800&token-hash=vGe7wXGqmA8Q7m-kDNb6fyGdwk-Dxk4F-ut8ZZu51RM%3D" alt="Takashi Shibuya" width="100"></td>
</tr><tr>
<td><a href="https://www.patreon.com/dansup">dansup</a></td>
<td><a href="https://www.patreon.com/mastodon">Gargron</a></td>
<td><a href="https://www.patreon.com/takenoko">Nokotaro Takeda</a></td>
<td><a href="https://www.patreon.com/user?u=23932002">nenohi</a></td>
<td><a href="https://www.patreon.com/user?u=12531784">Takashi Shibuya</a></td>
</tr></table>
**Last updated:** Sun, 01 Sep 2019 14:07:05 UTC
**Last updated:** Sun, 01 Sep 2019 22:11:05 UTC
<!-- PATREON_END -->
:four_leaf_clover: Copyright

View File

@ -1,7 +1,7 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "11.31.0",
"version": "11.31.3",
"codename": "daybreak",
"repository": {
"type": "git",

View File

@ -2,12 +2,17 @@
<transition name="zoom-in-top">
<div class="buebdbiu" ref="popover" v-if="show">
<i18n path="few-users" v-if="users.length <= 10">
<span slot="users">{{ users.join(', ') }}</span>
<span slot="users">
<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>
@ -29,6 +34,10 @@ export default Vue.extend({
type: Array,
required: true,
},
count: {
type: Number,
required: true,
},
source: {
required: true,
}
@ -44,6 +53,10 @@ export default Vue.extend({
this.$nextTick(() => {
const popover = this.$refs.popover as any;
if (this.source == null) {
this.destroyDom();
return;
}
const rect = this.source.getBoundingClientRect();
const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2);
@ -67,7 +80,6 @@ export default Vue.extend({
z-index 10000
display block
position absolute
min-width max-content
max-width 240px
font-size 0.8em
padding 5px 8px
@ -76,6 +88,8 @@ export default Vue.extend({
color var(--text)
border-radius 4px
box-shadow 0 var(--lineWidth) 4px rgba(#000, 0.25)
pointer-events none
transform-origin center -16px
&:before
content ""

View File

@ -47,7 +47,8 @@ export default Vue.extend({
data() {
return {
details: null,
detailsTimeoutId: null
detailsTimeoutId: null,
isHovering: false
};
},
computed: {
@ -89,24 +90,31 @@ export default Vue.extend({
}
},
onMouseover() {
this.isHovering = true;
this.detailsTimeoutId = setTimeout(this.openDetails, 300);
},
onMouseleave() {
this.isHovering = false;
clearTimeout(this.detailsTimeoutId);
this.closeDetails();
},
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.username);
.map(x => x.user);
this.closeDetails();
if (!this.isHovering) return;
this.details = this.$root.new(XDetails, {
reaction: this.reaction,
users,
count: this.count,
source: this.$refs.reaction
});
});
@ -169,6 +177,14 @@ export default Vue.extend({
border-radius 4px
cursor pointer
&, *
-webkit-touch-callout none
-webkit-user-select none
-khtml-user-select none
-moz-user-select none
-ms-user-select none
user-select none
*
user-select none
pointer-events none

View File

@ -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,