wip
This commit is contained in:
parent
63b930e9fd
commit
c26b5fe057
@ -25,17 +25,17 @@ module.exports = (params, me) => new Promise(async (res, rej) => {
|
|||||||
const [includeUserIds = [], includeUserIdsErr] = $(params.includeUserIds).optional.array('id').$;
|
const [includeUserIds = [], includeUserIdsErr] = $(params.includeUserIds).optional.array('id').$;
|
||||||
if (includeUserIdsErr) return rej('invalid includeUserIds param');
|
if (includeUserIdsErr) return rej('invalid includeUserIds param');
|
||||||
|
|
||||||
// Get 'exclude_userIds' parameter
|
// Get 'excludeUserIds' parameter
|
||||||
const [excludeUserIds = [], excludeUserIdsErr] = $(params.exclude_userIds).optional.array('id').$;
|
const [excludeUserIds = [], excludeUserIdsErr] = $(params.excludeUserIds).optional.array('id').$;
|
||||||
if (excludeUserIdsErr) return rej('invalid exclude_userIds param');
|
if (excludeUserIdsErr) return rej('invalid excludeUserIds param');
|
||||||
|
|
||||||
// Get 'includeUserUsernames' parameter
|
// Get 'includeUserUsernames' parameter
|
||||||
const [includeUserUsernames = [], includeUserUsernamesErr] = $(params.includeUserUsernames).optional.array('string').$;
|
const [includeUserUsernames = [], includeUserUsernamesErr] = $(params.includeUserUsernames).optional.array('string').$;
|
||||||
if (includeUserUsernamesErr) return rej('invalid includeUserUsernames param');
|
if (includeUserUsernamesErr) return rej('invalid includeUserUsernames param');
|
||||||
|
|
||||||
// Get 'exclude_userUsernames' parameter
|
// Get 'excludeUserUsernames' parameter
|
||||||
const [excludeUserUsernames = [], excludeUserUsernamesErr] = $(params.exclude_userUsernames).optional.array('string').$;
|
const [excludeUserUsernames = [], excludeUserUsernamesErr] = $(params.excludeUserUsernames).optional.array('string').$;
|
||||||
if (excludeUserUsernamesErr) return rej('invalid exclude_userUsernames param');
|
if (excludeUserUsernamesErr) return rej('invalid excludeUserUsernames param');
|
||||||
|
|
||||||
// Get 'following' parameter
|
// Get 'following' parameter
|
||||||
const [following = null, followingErr] = $(params.following).optional.nullable.boolean().$;
|
const [following = null, followingErr] = $(params.following).optional.nullable.boolean().$;
|
||||||
|
@ -197,7 +197,7 @@ export const pack = async (
|
|||||||
|
|
||||||
// Fetch my reaction
|
// Fetch my reaction
|
||||||
if (meId) {
|
if (meId) {
|
||||||
_post.my_reaction = (async () => {
|
_post.myReaction = (async () => {
|
||||||
const reaction = await Reaction
|
const reaction = await Reaction
|
||||||
.findOne({
|
.findOne({
|
||||||
userId: meId,
|
userId: meId,
|
||||||
|
@ -11,7 +11,7 @@ export default function(qs: string) {
|
|||||||
q['includeUserUsernames'] = value.split(',');
|
q['includeUserUsernames'] = value.split(',');
|
||||||
break;
|
break;
|
||||||
case 'exclude_user':
|
case 'exclude_user':
|
||||||
q['exclude_userUsernames'] = value.split(',');
|
q['excludeUserUsernames'] = value.split(',');
|
||||||
break;
|
break;
|
||||||
case 'follow':
|
case 'follow':
|
||||||
q['following'] = value == 'null' ? null : value == 'true';
|
q['following'] = value == 'null' ? null : value == 'true';
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<button @click="repost" title="Repost">
|
<button @click="repost" title="Repost">
|
||||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="リアクション">
|
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="リアクション">
|
||||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button @click="menu" ref="menuButton">
|
<button @click="menu" ref="menuButton">
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<button @click="repost" title="%i18n:desktop.tags.mk-timeline-post.repost%">
|
<button @click="repost" title="%i18n:desktop.tags.mk-timeline-post.repost%">
|
||||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="%i18n:desktop.tags.mk-timeline-post.add-reaction%">
|
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:desktop.tags.mk-timeline-post.add-reaction%">
|
||||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button @click="menu" ref="menuButton">
|
<button @click="menu" ref="menuButton">
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<button @click="repost" title="Repost">
|
<button @click="repost" title="Repost">
|
||||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="%i18n:mobile.tags.mk-post-detail.reaction%">
|
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:mobile.tags.mk-post-detail.reaction%">
|
||||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button @click="menu" ref="menuButton">
|
<button @click="menu" ref="menuButton">
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<button @click="repost" title="Repost">
|
<button @click="repost" title="Repost">
|
||||||
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
%fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton">
|
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton">
|
||||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="menu" @click="menu" ref="menuButton">
|
<button class="menu" @click="menu" ref="menuButton">
|
||||||
|
@ -53,7 +53,7 @@ props:
|
|||||||
desc:
|
desc:
|
||||||
ja: "投稿者"
|
ja: "投稿者"
|
||||||
en: "The author of this post"
|
en: "The author of this post"
|
||||||
- name: "my_reaction"
|
- name: "myReaction"
|
||||||
type: "string"
|
type: "string"
|
||||||
optional: true
|
optional: true
|
||||||
desc:
|
desc:
|
||||||
|
Loading…
Reference in New Issue
Block a user