summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-09 19:18:15 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-09 19:18:15 +0900
commit2560d3d1c18b474700e8f1ed76da0d71bd332b07 (patch)
treeca96851e517ae18c1071e6378ecd936cbfca9989 /src
parentoops (diff)
downloadmisskey-2560d3d1c18b474700e8f1ed76da0d71bd332b07.tar.gz
misskey-2560d3d1c18b474700e8f1ed76da0d71bd332b07.tar.bz2
misskey-2560d3d1c18b474700e8f1ed76da0d71bd332b07.zip
Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/messaging-room.message.vue6
-rw-r--r--src/client/app/common/views/components/messaging.vue2
-rw-r--r--src/client/app/common/views/components/welcome-timeline.vue2
-rw-r--r--src/client/app/desktop/views/components/notifications.vue12
-rw-r--r--src/client/app/desktop/views/components/user-preview.vue4
-rw-r--r--src/client/app/desktop/views/pages/user/user.friends.vue4
-rw-r--r--src/client/app/desktop/views/pages/welcome.vue2
-rw-r--r--src/client/app/desktop/views/widgets/polls.vue10
-rw-r--r--src/client/app/desktop/views/widgets/trends.vue10
-rw-r--r--src/client/app/mobile/views/components/notification.vue6
-rw-r--r--src/client/app/mobile/views/pages/user.vue4
-rw-r--r--src/client/app/mobile/views/pages/user/home.photos.vue6
12 files changed, 20 insertions, 48 deletions
diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue
index 7200b59bb2..fdb820a4ab 100644
--- a/src/client/app/common/views/components/messaging-room.message.vue
+++ b/src/client/app/common/views/components/messaging-room.message.vue
@@ -1,6 +1,6 @@
<template>
<div class="message" :data-is-me="isMe">
- <router-link class="avatar-anchor" :to="`/@${acct}`" :title="acct" target="_blank">
+ <router-link class="avatar-anchor" :to="message.user | userPage" :title="acct" target="_blank">
<img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/>
</router-link>
<div class="content">
@@ -34,7 +34,6 @@
<script lang="ts">
import Vue from 'vue';
-import getAcct from '../../../../../acct/render';
import parse from '../../../../../text/parse';
export default Vue.extend({
@@ -44,9 +43,6 @@ export default Vue.extend({
}
},
computed: {
- acct(): string {
- return getAcct(this.message.user);
- },
isMe(): boolean {
return this.message.userId == (this as any).os.i.id;
},
diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue
index 751e4de50d..05bf889746 100644
--- a/src/client/app/common/views/components/messaging.vue
+++ b/src/client/app/common/views/components/messaging.vue
@@ -24,7 +24,7 @@
<template>
<a v-for="message in messages"
class="user"
- :href="`/i/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`"
+ :href="`/i/messaging/${isMe(message) ? message.recipient : message.user | acct}`"
:data-is-me="isMe(message)"
:data-is-read="message.isRead"
@click.prevent="navigate(isMe(message) ? message.recipient : message.user)"
diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue
index 7571cfc5fd..a80bc04f7f 100644
--- a/src/client/app/common/views/components/welcome-timeline.vue
+++ b/src/client/app/common/views/components/welcome-timeline.vue
@@ -9,7 +9,7 @@
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
<span class="username">@{{ note.user | acct }}</span>
<div class="info">
- <router-link class="created-at" :to="`/@${getAcct(note.user)}/${note.id}`">
+ <router-link class="created-at" :to="note | notePage">
<mk-time :time="note.createdAt"/>
</router-link>
</div>
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index 8b17c8c430..598c2ad2fa 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -13,7 +13,7 @@
<mk-reaction-icon :reaction="notification.reaction"/>
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
</p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
</router-link>
</div>
@@ -26,7 +26,7 @@
<p>%fa:retweet%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
</p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%
</router-link>
</div>
@@ -39,7 +39,7 @@
<p>%fa:quote-left%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
</p>
- <router-link class="note-preview" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">{{ getNoteSummary(notification.note) }}</router-link>
+ <router-link class="note-preview" :to="notification.note | notePage">{{ getNoteSummary(notification.note) }}</router-link>
</div>
</template>
<template v-if="notification.type == 'follow'">
@@ -60,7 +60,7 @@
<p>%fa:reply%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
</p>
- <router-link class="note-preview" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">{{ getNoteSummary(notification.note) }}</router-link>
+ <router-link class="note-preview" :to="notification.note | notePage">{{ getNoteSummary(notification.note) }}</router-link>
</div>
</template>
<template v-if="notification.type == 'mention'">
@@ -71,7 +71,7 @@
<p>%fa:at%
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
</p>
- <a class="note-preview" :href="`/@${getAcct(notification.note.user)}/${notification.note.id}`">{{ getNoteSummary(notification.note) }}</a>
+ <a class="note-preview" :href="notification.note | notePage">{{ getNoteSummary(notification.note) }}</a>
</div>
</template>
<template v-if="notification.type == 'poll_vote'">
@@ -80,7 +80,7 @@
</router-link>
<div class="text">
<p>%fa:chart-pie%<a :href="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</a></p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
</router-link>
</div>
diff --git a/src/client/app/desktop/views/components/user-preview.vue b/src/client/app/desktop/views/components/user-preview.vue
index 24337eea24..bcd79dc2af 100644
--- a/src/client/app/desktop/views/components/user-preview.vue
+++ b/src/client/app/desktop/views/components/user-preview.vue
@@ -29,7 +29,6 @@
<script lang="ts">
import Vue from 'vue';
import * as anime from 'animejs';
-import getAcct from '../../../../../acct/render';
import parseAcct from '../../../../../acct/parse';
export default Vue.extend({
@@ -41,8 +40,7 @@ export default Vue.extend({
},
data() {
return {
- u: null,
- getAcct
+ u: null
};
},
mounted() {
diff --git a/src/client/app/desktop/views/pages/user/user.friends.vue b/src/client/app/desktop/views/pages/user/user.friends.vue
index 8512e8027e..4b5ec88d52 100644
--- a/src/client/app/desktop/views/pages/user/user.friends.vue
+++ b/src/client/app/desktop/views/pages/user/user.friends.vue
@@ -20,7 +20,6 @@
<script lang="ts">
import Vue from 'vue';
-import getAcct from '../../../../../../acct/render';
export default Vue.extend({
props: ['user'],
@@ -30,9 +29,6 @@ export default Vue.extend({
fetching: true
};
},
- methods: {
- getAcct
- },
mounted() {
(this as any).api('users/get_frequently_replied_users', {
userId: this.user.id,
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue
index bc6ebae774..93d17b58fe 100644
--- a/src/client/app/desktop/views/pages/welcome.vue
+++ b/src/client/app/desktop/views/pages/welcome.vue
@@ -43,7 +43,6 @@
<script lang="ts">
import Vue from 'vue';
import { docsUrl, copyright, lang } from '../../../config';
-import getAcct from '../../../../../acct/render';
const shares = [
'Everything!',
@@ -98,7 +97,6 @@ export default Vue.extend({
clearInterval(this.clock);
},
methods: {
- getAcct,
signup() {
this.$modal.show('signup');
},
diff --git a/src/client/app/desktop/views/widgets/polls.vue b/src/client/app/desktop/views/widgets/polls.vue
index eb49a4cd5c..6ce980821a 100644
--- a/src/client/app/desktop/views/widgets/polls.vue
+++ b/src/client/app/desktop/views/widgets/polls.vue
@@ -5,8 +5,8 @@
<button @click="fetch" title="%i18n:desktop.tags.mk-recommended-polls-home-widget.refresh%">%fa:sync%</button>
</template>
<div class="poll" v-if="!fetching && poll != null">
- <p v-if="poll.text"><router-link to="`/@${ acct }/${ poll.id }`">{{ poll.text }}</router-link></p>
- <p v-if="!poll.text"><router-link to="`/@${ acct }/${ poll.id }`">%fa:link%</router-link></p>
+ <p v-if="poll.text"><router-link to="poll | notePage">{{ poll.text }}</router-link></p>
+ <p v-if="!poll.text"><router-link to="poll | notePage">%fa:link%</router-link></p>
<mk-poll :note="poll"/>
</div>
<p class="empty" v-if="!fetching && poll == null">%i18n:desktop.tags.mk-recommended-polls-home-widget.nothing%</p>
@@ -16,7 +16,6 @@
<script lang="ts">
import define from '../../../common/define-widget';
-import getAcct from '../../../../../acct/render';
export default define({
name: 'polls',
@@ -24,11 +23,6 @@ export default define({
compact: false
})
}).extend({
- computed: {
- acct() {
- return getAcct(this.poll.user);
- },
- },
data() {
return {
poll: null,
diff --git a/src/client/app/desktop/views/widgets/trends.vue b/src/client/app/desktop/views/widgets/trends.vue
index c2c7636bb3..20e298730f 100644
--- a/src/client/app/desktop/views/widgets/trends.vue
+++ b/src/client/app/desktop/views/widgets/trends.vue
@@ -6,8 +6,8 @@
</template>
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<div class="note" v-else-if="note != null">
- <p class="text"><router-link :to="`/@${ acct }/${ note.id }`">{{ note.text }}</router-link></p>
- <p class="author">―<router-link :to="`/@${ acct }`">@{{ acct }}</router-link></p>
+ <p class="text"><router-link :to="note | notePage">{{ note.text }}</router-link></p>
+ <p class="author">―<router-link :to="note.user | userPage">@{{ note.user | acct }}</router-link></p>
</div>
<p class="empty" v-else>%i18n:desktop.tags.mk-trends-home-widget.nothing%</p>
</div>
@@ -15,7 +15,6 @@
<script lang="ts">
import define from '../../../common/define-widget';
-import getAcct from '../../../../../acct/render';
export default define({
name: 'trends',
@@ -23,11 +22,6 @@ export default define({
compact: false
})
}).extend({
- computed: {
- acct() {
- return getAcct(this.note.user);
- },
- },
data() {
return {
note: null,
diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue
index 5456c2c174..4f7c8968b2 100644
--- a/src/client/app/mobile/views/components/notification.vue
+++ b/src/client/app/mobile/views/components/notification.vue
@@ -10,7 +10,7 @@
<mk-reaction-icon :reaction="notification.reaction"/>
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
</p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note) }}
%fa:quote-right%
</router-link>
@@ -27,7 +27,7 @@
%fa:retweet%
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
</p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%
</router-link>
</div>
@@ -68,7 +68,7 @@
%fa:chart-pie%
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
</p>
- <router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
+ <router-link class="note-ref" :to="notification.note | notePage">
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
</router-link>
</div>
diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue
index fb9220ee86..f650f8aa82 100644
--- a/src/client/app/mobile/views/pages/user.vue
+++ b/src/client/app/mobile/views/pages/user.vue
@@ -30,11 +30,11 @@
<b>{{ user.notesCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.notes%</i>
</a>
- <a :href="`@${getAcct(user)}/following`">
+ <a :href="`${user | userPage}/following`">
<b>{{ user.followingCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.following%</i>
</a>
- <a :href="`@${getAcct(user)}/followers`">
+ <a :href="`${user | userPage}/followers`">
<b>{{ user.followersCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.followers%</i>
</a>
diff --git a/src/client/app/mobile/views/pages/user/home.photos.vue b/src/client/app/mobile/views/pages/user/home.photos.vue
index 1c59260812..0e0d6926a1 100644
--- a/src/client/app/mobile/views/pages/user/home.photos.vue
+++ b/src/client/app/mobile/views/pages/user/home.photos.vue
@@ -5,7 +5,7 @@
<a v-for="image in images"
class="img"
:style="`background-image: url(${image.media.url}?thumbnail&size=256)`"
- :href="`/@${getAcct(image.note.user)}/${image.note.id}`"
+ :href="image.note | notePage"
></a>
</div>
<p class="empty" v-if="!fetching && images.length == 0">%i18n:mobile.tags.mk-user-overview-photos.no-photos%</p>
@@ -14,7 +14,6 @@
<script lang="ts">
import Vue from 'vue';
-import getAcct from '../../../../../../acct/render';
export default Vue.extend({
props: ['user'],
@@ -24,9 +23,6 @@ export default Vue.extend({
images: []
};
},
- methods: {
- getAcct
- },
mounted() {
(this as any).api('users/notes', {
userId: this.user.id,