Allow name property of user to be null
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<template v-if="notification.type == 'reaction'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p><mk-reaction-icon :reaction="notification.reaction"/>{{ notification.user.name }}</p>
|
||||
<p><mk-reaction-icon :reaction="notification.reaction"/>{{ name }}</p>
|
||||
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -11,7 +11,7 @@
|
||||
<template v-if="notification.type == 'repost'">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:retweet%{{ notification.post.user.name }}</p>
|
||||
<p>%fa:retweet%{{ posterName }}</p>
|
||||
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -19,7 +19,7 @@
|
||||
<template v-if="notification.type == 'quote'">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:quote-left%{{ notification.post.user.name }}</p>
|
||||
<p>%fa:quote-left%{{ posterName }}</p>
|
||||
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -27,14 +27,14 @@
|
||||
<template v-if="notification.type == 'follow'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:user-plus%{{ notification.user.name }}</p>
|
||||
<p>%fa:user-plus%{{ name }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="notification.type == 'reply'">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:reply%{{ notification.post.user.name }}</p>
|
||||
<p>%fa:reply%{{ posterName }}</p>
|
||||
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -42,7 +42,7 @@
|
||||
<template v-if="notification.type == 'mention'">
|
||||
<img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:at%{{ notification.post.user.name }}</p>
|
||||
<p>%fa:at%{{ posterName }}</p>
|
||||
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -50,7 +50,7 @@
|
||||
<template v-if="notification.type == 'poll_vote'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:chart-pie%{{ notification.user.name }}</p>
|
||||
<p>%fa:chart-pie%{{ name }}</p>
|
||||
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -60,9 +60,18 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getPostSummary from '../../../../../renderers/get-post-summary';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['notification'],
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.notification.user);
|
||||
},
|
||||
posterName() {
|
||||
return getUserName(this.notification.post.user);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
getPostSummary
|
||||
|
@ -8,7 +8,7 @@
|
||||
<div class="text">
|
||||
<p>
|
||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||
<router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link>
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`">
|
||||
%fa:quote-left%{{ getPostSummary(notification.post) }}
|
||||
@ -25,7 +25,7 @@
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:retweet%
|
||||
<router-link :to="`/@${acct}`">{{ notification.post.user.name }}</router-link>
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.post.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`">
|
||||
%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:user-plus%
|
||||
<router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link>
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -66,7 +66,7 @@
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:chart-pie%
|
||||
<router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link>
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`">
|
||||
%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%
|
||||
@ -80,12 +80,19 @@
|
||||
import Vue from 'vue';
|
||||
import getPostSummary from '../../../../../renderers/get-post-summary';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['notification'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.notification.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.notification.user);
|
||||
},
|
||||
posterName() {
|
||||
return getUserName(this.notification.post.user);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="mk-post-card">
|
||||
<a :href="`/@${acct}/${post.id}`">
|
||||
<header>
|
||||
<img :src="`${acct}?thumbnail&size=64`" alt="avatar"/><h3>{{ post.user.name }}</h3>
|
||||
<img :src="`${acct}?thumbnail&size=64`" alt="avatar"/><h3>{{ name }}</h3>
|
||||
</header>
|
||||
<div>
|
||||
{{ text }}
|
||||
@ -16,6 +16,7 @@
|
||||
import Vue from 'vue';
|
||||
import summary from '../../../../../renderers/get-post-summary';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
@ -23,6 +24,9 @@ export default Vue.extend({
|
||||
acct() {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.post.user);
|
||||
},
|
||||
text(): string {
|
||||
return summary(this.post);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ getUserName(post.user) }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="time" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.createdAt"/>
|
||||
@ -21,12 +21,16 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.post.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -22,7 +22,7 @@
|
||||
</router-link>
|
||||
%fa:retweet%
|
||||
<router-link class="name" :to="`/@${acct}`">
|
||||
{{ post.user.name }}
|
||||
{{ name }}
|
||||
</router-link>
|
||||
がRepost
|
||||
</p>
|
||||
@ -33,7 +33,7 @@
|
||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div>
|
||||
<router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${pAcct}`">{{ pName }}</router-link>
|
||||
<span class="username">@{{ pAcct }}</span>
|
||||
</div>
|
||||
</header>
|
||||
@ -81,6 +81,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
import parse from '../../../../../text/parse';
|
||||
|
||||
import MkPostMenu from '../../../common/views/components/post-menu.vue';
|
||||
@ -114,9 +115,15 @@ export default Vue.extend({
|
||||
acct(): string {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name(): string {
|
||||
return getUserName(this.post.user);
|
||||
},
|
||||
pAcct(): string {
|
||||
return getAcct(this.p.user);
|
||||
},
|
||||
pName(): string {
|
||||
return getUserName(this.p.user);
|
||||
},
|
||||
isRepost(): boolean {
|
||||
return (this.post.repost &&
|
||||
this.post.text == null &&
|
||||
|
@ -5,7 +5,7 @@
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ name }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="time" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.createdAt"/>
|
||||
@ -21,12 +21,16 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.post.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ getUserName(post.user) }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<router-link class="created-at" :to="`/@${acct}/${post.id}`">
|
||||
<mk-time :time="post.createdAt"/>
|
||||
@ -21,12 +21,16 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.post.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -10,7 +10,7 @@
|
||||
</router-link>
|
||||
%fa:retweet%
|
||||
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ name }}</router-link>
|
||||
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr('%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span>
|
||||
</p>
|
||||
<mk-time :time="post.createdAt"/>
|
||||
@ -21,7 +21,7 @@
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${pAcct}`">{{ pName }}</router-link>
|
||||
<span class="is-bot" v-if="p.user.host === null && p.user.account.isBot">bot</span>
|
||||
<span class="username">@{{ pAcct }}</span>
|
||||
<div class="info">
|
||||
@ -78,6 +78,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
import parse from '../../../../../text/parse';
|
||||
|
||||
import MkPostMenu from '../../../common/views/components/post-menu.vue';
|
||||
@ -102,9 +103,15 @@ export default Vue.extend({
|
||||
acct(): string {
|
||||
return getAcct(this.post.user);
|
||||
},
|
||||
name(): string {
|
||||
return getUserName(this.post.user);
|
||||
},
|
||||
pAcct(): string {
|
||||
return getAcct(this.p.user);
|
||||
},
|
||||
pName(): string {
|
||||
return getUserName(this.p.user);
|
||||
},
|
||||
isRepost(): boolean {
|
||||
return (this.post.repost &&
|
||||
this.post.text == null &&
|
||||
|
@ -3,7 +3,7 @@
|
||||
<mk-special-message/>
|
||||
<div class="main" ref="main">
|
||||
<div class="backdrop"></div>
|
||||
<p ref="welcomeback" v-if="os.isSignedIn">おかえりなさい、<b>{{ os.i.name }}</b>さん</p>
|
||||
<p ref="welcomeback" v-if="os.isSignedIn">おかえりなさい、<b>{{ name }}</b>さん</p>
|
||||
<div class="content" ref="mainContainer">
|
||||
<button class="nav" @click="$parent.isDrawerOpening = true">%fa:bars%</button>
|
||||
<template v-if="hasUnreadNotifications || hasUnreadMessagingMessages || hasGameInvitations">%fa:circle%</template>
|
||||
@ -19,9 +19,15 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as anime from 'animejs';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['func'],
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.os.i);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hasUnreadNotifications: false,
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="body" v-if="isOpen">
|
||||
<router-link class="me" v-if="os.isSignedIn" :to="`/@${os.i.username}`">
|
||||
<img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=128`" alt="avatar"/>
|
||||
<p class="name">{{ os.i.name }}</p>
|
||||
<p class="name">{{ name }}</p>
|
||||
</router-link>
|
||||
<div class="links">
|
||||
<ul>
|
||||
@ -40,9 +40,15 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { docsUrl, chUrl, lang } from '../../../config';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['isOpen'],
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.os.i);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hasUnreadNotifications: false,
|
||||
|
@ -5,7 +5,7 @@
|
||||
<img :src="`${user.avatarUrl}?thumbnail&size=200`" alt="avatar"/>
|
||||
</a>
|
||||
</header>
|
||||
<a class="name" :href="`/@${acct}`" target="_blank">{{ user.name }}</a>
|
||||
<a class="name" :href="`/@${acct}`" target="_blank">{{ name }}</a>
|
||||
<p class="username">@{{ acct }}</p>
|
||||
<mk-follow-button :user="user"/>
|
||||
</div>
|
||||
@ -14,12 +14,16 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
</router-link>
|
||||
<div class="main">
|
||||
<header>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ user.name }}</router-link>
|
||||
<router-link class="name" :to="`/@${acct}`">{{ name }}</router-link>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
</header>
|
||||
<div class="body">
|
||||
@ -18,12 +18,16 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.user);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<mk-ui>
|
||||
<template slot="header" v-if="!fetching">
|
||||
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt="">
|
||||
{{ '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) }}
|
||||
{{ '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', name) }}
|
||||
</template>
|
||||
<mk-users-list
|
||||
v-if="!fetching"
|
||||
@ -20,6 +20,7 @@
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import parseAcct from '../../../../../acct/parse';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
@ -28,6 +29,11 @@ export default Vue.extend({
|
||||
user: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: 'fetch'
|
||||
},
|
||||
@ -46,7 +52,7 @@ export default Vue.extend({
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
|
||||
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', this.name) + ' | Misskey';
|
||||
});
|
||||
},
|
||||
onLoaded() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<mk-ui>
|
||||
<template slot="header" v-if="!fetching">
|
||||
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt="">
|
||||
{{ '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', user.name) }}
|
||||
{{ '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', name) }}
|
||||
</template>
|
||||
<mk-users-list
|
||||
v-if="!fetching"
|
||||
@ -20,6 +20,7 @@
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import parseAcct from '../../../../../acct/parse';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
@ -28,6 +29,11 @@ export default Vue.extend({
|
||||
user: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: 'fetch'
|
||||
},
|
||||
@ -46,7 +52,7 @@ export default Vue.extend({
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
|
||||
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', this.name) + ' | Misskey';
|
||||
});
|
||||
},
|
||||
onLoaded() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<mk-ui>
|
||||
<span slot="header">
|
||||
<template v-if="user">%fa:R comments%{{ user.name }}</template>
|
||||
<template v-if="user">%fa:R comments%{{ name }}</template>
|
||||
<template v-else><mk-ellipsis/></template>
|
||||
</span>
|
||||
<mk-messaging-room v-if="!fetching" :user="user" :is-naked="true"/>
|
||||
@ -11,6 +11,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import parseAcct from '../../../../../acct/parse';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
@ -19,6 +20,11 @@ export default Vue.extend({
|
||||
user: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: 'fetch'
|
||||
},
|
||||
@ -33,7 +39,7 @@ export default Vue.extend({
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${user.name} | Misskey`;
|
||||
document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${this.name} | Misskey`;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ export default Vue.extend({
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.name = (this as any).os.i.name;
|
||||
this.name = (this as any).os.i.name || '';
|
||||
this.location = (this as any).os.i.account.profile.location;
|
||||
this.description = (this as any).os.i.description;
|
||||
this.birthday = (this as any).os.i.account.profile.birthday;
|
||||
@ -94,7 +94,7 @@ export default Vue.extend({
|
||||
this.saving = true;
|
||||
|
||||
(this as any).api('i/update', {
|
||||
name: this.name,
|
||||
name: this.name || null,
|
||||
location: this.location || null,
|
||||
description: this.description || null,
|
||||
birthday: this.birthday || null
|
||||
|
@ -2,7 +2,7 @@
|
||||
<mk-ui>
|
||||
<span slot="header">%fa:cog%%i18n:mobile.tags.mk-settings-page.settings%</span>
|
||||
<div :class="$style.content">
|
||||
<p v-html="'%i18n:mobile.tags.mk-settings.signed-in-as%'.replace('{}', '<b>' + os.i.name + '</b>')"></p>
|
||||
<p v-html="'%i18n:mobile.tags.mk-settings.signed-in-as%'.replace('{}', '<b>' + name + '</b>')"></p>
|
||||
<ul>
|
||||
<li><router-link to="./settings/profile">%fa:user%%i18n:mobile.tags.mk-settings-page.profile%%fa:angle-right%</router-link></li>
|
||||
<li><router-link to="./settings/authorized-apps">%fa:puzzle-piece%%i18n:mobile.tags.mk-settings-page.applications%%fa:angle-right%</router-link></li>
|
||||
@ -20,6 +20,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { version, codename } from '../../../config';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
@ -28,6 +29,11 @@ export default Vue.extend({
|
||||
codename
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.os.i);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'Misskey | %i18n:mobile.tags.mk-settings-page.settings%';
|
||||
document.documentElement.style.background = '#313a42';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<mk-ui>
|
||||
<span slot="header" v-if="!fetching">%fa:user% {{ user.name }}</span>
|
||||
<span slot="header" v-if="!fetching">%fa:user% {{ user }}</span>
|
||||
<main v-if="!fetching">
|
||||
<header>
|
||||
<div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=1024)` : ''"></div>
|
||||
@ -12,7 +12,7 @@
|
||||
<mk-follow-button v-if="os.isSignedIn && os.i.id != user.id" :user="user"/>
|
||||
</div>
|
||||
<div class="title">
|
||||
<h1>{{ user.name }}</h1>
|
||||
<h1>{{ user }}</h1>
|
||||
<span class="username">@{{ acct }}</span>
|
||||
<span class="followed" v-if="user.isFollowed">%i18n:mobile.tags.mk-user.follows-you%</span>
|
||||
</div>
|
||||
@ -61,7 +61,7 @@
|
||||
import Vue from 'vue';
|
||||
import * as age from 's-age';
|
||||
import getAcct from '../../../../../acct/render';
|
||||
import getAcct from '../../../../../acct/parse';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import XHome from './user/home.vue';
|
||||
|
||||
@ -82,6 +82,9 @@ export default Vue.extend({
|
||||
},
|
||||
age(): number {
|
||||
return age(this.user.account.profile.birthday);
|
||||
},
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -102,7 +105,7 @@ export default Vue.extend({
|
||||
this.fetching = false;
|
||||
|
||||
Progress.done();
|
||||
document.title = user.name + ' | Misskey';
|
||||
document.title = this.name + ' | Misskey';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:mobile.tags.mk-user-overview-followers-you-know.loading%<mk-ellipsis/></p>
|
||||
<div v-if="!fetching && users.length > 0">
|
||||
<a v-for="user in users" :key="user.id" :href="`/@${getAcct(user)}`">
|
||||
<img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user.name"/>
|
||||
<img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="getUserName(user)"/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="empty" v-if="!fetching && users.length == 0">%i18n:mobile.tags.mk-user-overview-followers-you-know.no-users%</p>
|
||||
@ -13,6 +13,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../acct/render';
|
||||
import getUserName from '../../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
@ -22,6 +23,11 @@ export default Vue.extend({
|
||||
users: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.user);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAcct
|
||||
},
|
||||
|
@ -8,15 +8,23 @@
|
||||
:src="`${os.i.avatarUrl}?thumbnail&size=96`"
|
||||
alt="avatar"
|
||||
/>
|
||||
<router-link :class="$style.name" :to="`/@${os.i.username}`">{{ os.i.name }}</router-link>
|
||||
<router-link :class="$style.name" :to="`/@${os.i.username}`">{{ name }}</router-link>
|
||||
</mk-widget-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../common/define-widget';
|
||||
import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default define({
|
||||
name: 'profile'
|
||||
}).extend({
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.os.i);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user