mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-11 21:29:08 +09:00
Fix bug
This commit is contained in:
parent
47fc8f63be
commit
2560d3d1c1
@ -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;
|
||||
},
|
||||
|
@ -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)"
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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() {
|
||||
|
@ -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,
|
||||
|
@ -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');
|
||||
},
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user