mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 13:13:08 +02:00
Fix bug
This commit is contained in:
parent
47fc8f63be
commit
2560d3d1c1
12 changed files with 20 additions and 48 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="message" :data-is-me="isMe">
|
<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=""/>
|
<img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/>
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -34,7 +34,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import getAcct from '../../../../../acct/render';
|
|
||||||
import parse from '../../../../../text/parse';
|
import parse from '../../../../../text/parse';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
@ -44,9 +43,6 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
acct(): string {
|
|
||||||
return getAcct(this.message.user);
|
|
||||||
},
|
|
||||||
isMe(): boolean {
|
isMe(): boolean {
|
||||||
return this.message.userId == (this as any).os.i.id;
|
return this.message.userId == (this as any).os.i.id;
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<template>
|
<template>
|
||||||
<a v-for="message in messages"
|
<a v-for="message in messages"
|
||||||
class="user"
|
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-me="isMe(message)"
|
||||||
:data-is-read="message.isRead"
|
:data-is-read="message.isRead"
|
||||||
@click.prevent="navigate(isMe(message) ? message.recipient : message.user)"
|
@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>
|
<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>
|
<span class="username">@{{ note.user | acct }}</span>
|
||||||
<div class="info">
|
<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"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||||
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
|
<router-link :to="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</router-link>
|
||||||
</p>
|
</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%
|
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<p>%fa:retweet%
|
<p>%fa:retweet%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
</p>
|
</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%
|
%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<p>%fa:quote-left%
|
<p>%fa:quote-left%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
</p>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'follow'">
|
<template v-if="notification.type == 'follow'">
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<p>%fa:reply%
|
<p>%fa:reply%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
</p>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'mention'">
|
<template v-if="notification.type == 'mention'">
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<p>%fa:at%
|
<p>%fa:at%
|
||||||
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
<router-link :to="notification.note.user | userPage" v-user-preview="notification.note.userId">{{ notification.note.user | userName }}</router-link>
|
||||||
</p>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="notification.type == 'poll_vote'">
|
<template v-if="notification.type == 'poll_vote'">
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>%fa:chart-pie%<a :href="notification.user | userPage" v-user-preview="notification.user.id">{{ notification.user | userName }}</a></p>
|
<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%
|
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as anime from 'animejs';
|
import * as anime from 'animejs';
|
||||||
import getAcct from '../../../../../acct/render';
|
|
||||||
import parseAcct from '../../../../../acct/parse';
|
import parseAcct from '../../../../../acct/parse';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
@ -41,8 +40,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
u: null,
|
u: null
|
||||||
getAcct
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import getAcct from '../../../../../../acct/render';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['user'],
|
props: ['user'],
|
||||||
|
@ -30,9 +29,6 @@ export default Vue.extend({
|
||||||
fetching: true
|
fetching: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
getAcct
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
(this as any).api('users/get_frequently_replied_users', {
|
(this as any).api('users/get_frequently_replied_users', {
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { docsUrl, copyright, lang } from '../../../config';
|
import { docsUrl, copyright, lang } from '../../../config';
|
||||||
import getAcct from '../../../../../acct/render';
|
|
||||||
|
|
||||||
const shares = [
|
const shares = [
|
||||||
'Everything!',
|
'Everything!',
|
||||||
|
@ -98,7 +97,6 @@ export default Vue.extend({
|
||||||
clearInterval(this.clock);
|
clearInterval(this.clock);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getAcct,
|
|
||||||
signup() {
|
signup() {
|
||||||
this.$modal.show('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>
|
<button @click="fetch" title="%i18n:desktop.tags.mk-recommended-polls-home-widget.refresh%">%fa:sync%</button>
|
||||||
</template>
|
</template>
|
||||||
<div class="poll" v-if="!fetching && poll != null">
|
<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="poll | notePage">{{ 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">%fa:link%</router-link></p>
|
||||||
<mk-poll :note="poll"/>
|
<mk-poll :note="poll"/>
|
||||||
</div>
|
</div>
|
||||||
<p class="empty" v-if="!fetching && poll == null">%i18n:desktop.tags.mk-recommended-polls-home-widget.nothing%</p>
|
<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">
|
<script lang="ts">
|
||||||
import define from '../../../common/define-widget';
|
import define from '../../../common/define-widget';
|
||||||
import getAcct from '../../../../../acct/render';
|
|
||||||
|
|
||||||
export default define({
|
export default define({
|
||||||
name: 'polls',
|
name: 'polls',
|
||||||
|
@ -24,11 +23,6 @@ export default define({
|
||||||
compact: false
|
compact: false
|
||||||
})
|
})
|
||||||
}).extend({
|
}).extend({
|
||||||
computed: {
|
|
||||||
acct() {
|
|
||||||
return getAcct(this.poll.user);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
poll: null,
|
poll: null,
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
</template>
|
</template>
|
||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
<div class="note" v-else-if="note != null">
|
<div class="note" v-else-if="note != null">
|
||||||
<p class="text"><router-link :to="`/@${ acct }/${ note.id }`">{{ note.text }}</router-link></p>
|
<p class="text"><router-link :to="note | notePage">{{ note.text }}</router-link></p>
|
||||||
<p class="author">―<router-link :to="`/@${ acct }`">@{{ acct }}</router-link></p>
|
<p class="author">―<router-link :to="note.user | userPage">@{{ note.user | acct }}</router-link></p>
|
||||||
</div>
|
</div>
|
||||||
<p class="empty" v-else>%i18n:desktop.tags.mk-trends-home-widget.nothing%</p>
|
<p class="empty" v-else>%i18n:desktop.tags.mk-trends-home-widget.nothing%</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import define from '../../../common/define-widget';
|
import define from '../../../common/define-widget';
|
||||||
import getAcct from '../../../../../acct/render';
|
|
||||||
|
|
||||||
export default define({
|
export default define({
|
||||||
name: 'trends',
|
name: 'trends',
|
||||||
|
@ -23,11 +22,6 @@ export default define({
|
||||||
compact: false
|
compact: false
|
||||||
})
|
})
|
||||||
}).extend({
|
}).extend({
|
||||||
computed: {
|
|
||||||
acct() {
|
|
||||||
return getAcct(this.note.user);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
note: null,
|
note: null,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||||
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
||||||
</p>
|
</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-left%{{ getNoteSummary(notification.note) }}
|
||||||
%fa:quote-right%
|
%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
||||||
</p>
|
</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%
|
%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
%fa:chart-pie%
|
%fa:chart-pie%
|
||||||
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
<router-link :to="notification.user | userPage">{{ notification.user | userName }}</router-link>
|
||||||
</p>
|
</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%
|
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
<b>{{ user.notesCount | number }}</b>
|
<b>{{ user.notesCount | number }}</b>
|
||||||
<i>%i18n:mobile.tags.mk-user.notes%</i>
|
<i>%i18n:mobile.tags.mk-user.notes%</i>
|
||||||
</a>
|
</a>
|
||||||
<a :href="`@${getAcct(user)}/following`">
|
<a :href="`${user | userPage}/following`">
|
||||||
<b>{{ user.followingCount | number }}</b>
|
<b>{{ user.followingCount | number }}</b>
|
||||||
<i>%i18n:mobile.tags.mk-user.following%</i>
|
<i>%i18n:mobile.tags.mk-user.following%</i>
|
||||||
</a>
|
</a>
|
||||||
<a :href="`@${getAcct(user)}/followers`">
|
<a :href="`${user | userPage}/followers`">
|
||||||
<b>{{ user.followersCount | number }}</b>
|
<b>{{ user.followersCount | number }}</b>
|
||||||
<i>%i18n:mobile.tags.mk-user.followers%</i>
|
<i>%i18n:mobile.tags.mk-user.followers%</i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<a v-for="image in images"
|
<a v-for="image in images"
|
||||||
class="img"
|
class="img"
|
||||||
:style="`background-image: url(${image.media.url}?thumbnail&size=256)`"
|
:style="`background-image: url(${image.media.url}?thumbnail&size=256)`"
|
||||||
:href="`/@${getAcct(image.note.user)}/${image.note.id}`"
|
:href="image.note | notePage"
|
||||||
></a>
|
></a>
|
||||||
</div>
|
</div>
|
||||||
<p class="empty" v-if="!fetching && images.length == 0">%i18n:mobile.tags.mk-user-overview-photos.no-photos%</p>
|
<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">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import getAcct from '../../../../../../acct/render';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['user'],
|
props: ['user'],
|
||||||
|
@ -24,9 +23,6 @@ export default Vue.extend({
|
||||||
images: []
|
images: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
getAcct
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
(this as any).api('users/notes', {
|
(this as any).api('users/notes', {
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
Loading…
Reference in a new issue