This commit is contained in:
syuilo
2018-04-09 19:18:15 +09:00
parent 47fc8f63be
commit 2560d3d1c1
12 changed files with 20 additions and 48 deletions

View File

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

View File

@@ -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() {

View File

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

View File

@@ -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');
},

View File

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

View File

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