revert: 650187deaf
This commit is contained in:
parent
6f7cfa82b5
commit
73f06e591a
31 changed files with 70 additions and 33 deletions
|
@ -150,9 +150,17 @@ export class CustomEmojiService {
|
||||||
if (note.renote) {
|
if (note.renote) {
|
||||||
emojis = emojis.concat(note.renote.emojis
|
emojis = emojis.concat(note.renote.emojis
|
||||||
.map(e => this.parseEmojiStr(e, note.renote!.userHost)));
|
.map(e => this.parseEmojiStr(e, note.renote!.userHost)));
|
||||||
|
if (note.renote.user) {
|
||||||
|
emojis = emojis.concat(note.renote.user.emojis
|
||||||
|
.map(e => this.parseEmojiStr(e, note.renote!.userHost)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const customReactions = Object.keys(note.reactions).map(x => this.reactionService.decodeReaction(x)).filter(x => x.name != null) as typeof emojis;
|
const customReactions = Object.keys(note.reactions).map(x => this.reactionService.decodeReaction(x)).filter(x => x.name != null) as typeof emojis;
|
||||||
emojis = emojis.concat(customReactions);
|
emojis = emojis.concat(customReactions);
|
||||||
|
if (note.user) {
|
||||||
|
emojis = emojis.concat(note.user.emojis
|
||||||
|
.map(e => this.parseEmojiStr(e, note.userHost)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return emojis.filter(x => x.name != null && x.host != null) as { name: string; host: string; }[];
|
return emojis.filter(x => x.name != null && x.host != null) as { name: string; host: string; }[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,6 +413,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
faviconUrl: instance.faviconUrl,
|
faviconUrl: instance.faviconUrl,
|
||||||
themeColor: instance.themeColor,
|
themeColor: instance.themeColor,
|
||||||
} : undefined) : undefined,
|
} : undefined) : undefined,
|
||||||
|
emojis: this.customEmojiService.populateEmojis(user.emojis, user.host),
|
||||||
onlineStatus: this.getOnlineStatus(user),
|
onlineStatus: this.getOnlineStatus(user),
|
||||||
// パフォーマンス上の理由でローカルユーザーのみ
|
// パフォーマンス上の理由でローカルユーザーのみ
|
||||||
badgeRoles: user.host == null ? this.roleService.getUserBadgeRoles(user.id).then(rs => rs.map(r => ({
|
badgeRoles: user.host == null ? this.roleService.getUserBadgeRoles(user.id).then(rs => rs.map(r => ({
|
||||||
|
@ -463,7 +464,6 @@ export class UserEntityService implements OnModuleInit {
|
||||||
isModerator: role.isModerator,
|
isModerator: role.isModerator,
|
||||||
isAdministrator: role.isAdministrator,
|
isAdministrator: role.isAdministrator,
|
||||||
}))),
|
}))),
|
||||||
emojis: this.customEmojiService.populateEmojis(user.emojis, user.host),
|
|
||||||
} : {}),
|
} : {}),
|
||||||
|
|
||||||
...(opts.detail && isMe ? {
|
...(opts.detail && isMe ? {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<MkA v-user-preview="report.targetUserId" class="info" :to="`/user-info/${report.targetUserId}`">
|
<MkA v-user-preview="report.targetUserId" class="info" :to="`/user-info/${report.targetUserId}`">
|
||||||
<MkAvatar class="avatar" :user="report.targetUser" indicator/>
|
<MkAvatar class="avatar" :user="report.targetUser" indicator/>
|
||||||
<div class="names">
|
<div class="names">
|
||||||
<span class="name _nowrap">{{ report.targetUser.name ?? report.targetUser.username }}</span>
|
<MkUserName class="name" :user="report.targetUser"/>
|
||||||
<MkAcct class="acct" :user="report.targetUser" style="display: block;"/>
|
<MkAcct class="acct" :user="report.targetUser" style="display: block;"/>
|
||||||
</div>
|
</div>
|
||||||
</MkA>
|
</MkA>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<li v-for="user in users" tabindex="-1" :class="$style.item" @click="complete(type, user)" @keydown="onKeydown">
|
<li v-for="user in users" tabindex="-1" :class="$style.item" @click="complete(type, user)" @keydown="onKeydown">
|
||||||
<img :class="$style.avatar" :src="user.avatarUrl"/>
|
<img :class="$style.avatar" :src="user.avatarUrl"/>
|
||||||
<span :class="$style.userName">
|
<span :class="$style.userName">
|
||||||
<span :key="user.id" class="_nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName :key="user.id" :user="user"/>
|
||||||
</span>
|
</span>
|
||||||
<span>@{{ acct(user) }}</span>
|
<span>@{{ acct(user) }}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<span v-if="item.indicate" :class="$style.indicator"><i class="_indicatorCircle"></i></span>
|
<span v-if="item.indicate" :class="$style.indicator"><i class="_indicatorCircle"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<button v-else-if="item.type === 'user'" :tabindex="i" class="_button" :class="[$style.item, { [$style.active]: item.active }]" :disabled="item.active" @click="clicked(item.action, $event)" @mouseenter.passive="onItemMouseEnter(item)" @mouseleave.passive="onItemMouseLeave(item)">
|
<button v-else-if="item.type === 'user'" :tabindex="i" class="_button" :class="[$style.item, { [$style.active]: item.active }]" :disabled="item.active" @click="clicked(item.action, $event)" @mouseenter.passive="onItemMouseEnter(item)" @mouseleave.passive="onItemMouseLeave(item)">
|
||||||
<MkAvatar :user="item.user" :class="$style.avatar"/><span class="_nowrap">{{ item.user.name ?? item.user.username }}</span>
|
<MkAvatar :user="item.user" :class="$style.avatar"/><MkUserName :user="item.user"/>
|
||||||
<span v-if="item.indicate" :class="$style.indicator"><i class="_indicatorCircle"></i></span>
|
<span v-if="item.indicate" :class="$style.indicator"><i class="_indicatorCircle"></i></span>
|
||||||
</button>
|
</button>
|
||||||
<span v-else-if="item.type === 'switch'" :tabindex="i" :class="$style.item" @mouseenter.passive="onItemMouseEnter(item)" @mouseleave.passive="onItemMouseLeave(item)">
|
<span v-else-if="item.type === 'switch'" :tabindex="i" :class="$style.item" @mouseenter.passive="onItemMouseEnter(item)" @mouseleave.passive="onItemMouseLeave(item)">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
|
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
|
||||||
<template #user>
|
<template #user>
|
||||||
<MkA v-user-preview="note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
|
<MkA v-user-preview="note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
|
||||||
<span class="_nowrap">{{ note.user.name ?? note.user.username }}</span>
|
<MkUserName :user="note.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
||||||
<template #name>
|
<template #name>
|
||||||
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
|
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
|
||||||
<span class="_nowrap">{{ appearNote.user.name ?? appearNote.user.username }}</span>
|
<MkUserName :user="appearNote.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<I18n :src="i18n.ts.renotedBy" tag="span">
|
<I18n :src="i18n.ts.renotedBy" tag="span">
|
||||||
<template #user>
|
<template #user>
|
||||||
<MkA v-user-preview="note.userId" class="name" :to="userPage(note.user)">
|
<MkA v-user-preview="note.userId" class="name" :to="userPage(note.user)">
|
||||||
<span class="_nowrap">{{ note.user.name ?? note.user.username }}</span>
|
<MkUserName :user="note.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<MkA v-user-preview="appearNote.user.id" class="name" :to="userPage(appearNote.user)">
|
<MkA v-user-preview="appearNote.user.id" class="name" :to="userPage(appearNote.user)">
|
||||||
<span class="_nowrap">{{ appearNote.user.name ?? appearNote.user.username }}</span>
|
<MkUserName :nowrap="false" :user="appearNote.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
<span v-if="appearNote.user.isBot" class="is-bot">bot</span>
|
<span v-if="appearNote.user.isBot" class="is-bot">bot</span>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
||||||
<template #name>
|
<template #name>
|
||||||
<MkA v-user-preview="appearNote.userId" class="name" :to="userPage(appearNote.user)">
|
<MkA v-user-preview="appearNote.userId" class="name" :to="userPage(appearNote.user)">
|
||||||
<span class="_nowrap">{{ appearNote.user.name ?? appearNote.user.username }}</span>
|
<MkUserName :user="appearNote.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<header :class="$style.root">
|
<header :class="$style.root">
|
||||||
<MkA v-once v-user-preview="note.user.id" :class="$style.name" :to="userPage(note.user)">
|
<MkA v-once v-user-preview="note.user.id" :class="$style.name" :to="userPage(note.user)">
|
||||||
<span class="_nowrap">{{ note.user.name ?? note.user.username }}</span>
|
<MkUserName :user="note.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
<div v-if="note.user.isBot" :class="$style.isBot">bot</div>
|
<div v-if="note.user.isBot" :class="$style.isBot">bot</div>
|
||||||
<div :class="$style.username"><MkAcct :user="note.user"/></div>
|
<div :class="$style.username"><MkAcct :user="note.user"/></div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<MkAvatar :class="$style.avatar" :user="$i" link preview/>
|
<MkAvatar :class="$style.avatar" :user="$i" link preview/>
|
||||||
<div :class="$style.main">
|
<div :class="$style.main">
|
||||||
<div :class="$style.header">
|
<div :class="$style.header">
|
||||||
<span class="_nowrap">{{ $i.name ?? $i.username }}</span>
|
<MkUserName :user="$i"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div :class="$style.content">
|
<div :class="$style.content">
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<header :class="$style.header">
|
<header :class="$style.header">
|
||||||
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
|
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
|
||||||
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
|
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
|
||||||
<MkA v-else-if="notification.user" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><span class="_nowrap">{{ notification.user.name ?? notification.user.username }}</span></MkA>
|
<MkA v-else-if="notification.user" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><MkUserName :user="notification.user"/></MkA>
|
||||||
<span v-else>{{ notification.header }}</span>
|
<span v-else>{{ notification.header }}</span>
|
||||||
<MkTime v-if="withTime" :time="notification.createdAt" :class="$style.headerTime"/>
|
<MkTime v-if="withTime" :time="notification.createdAt" :class="$style.headerTime"/>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div :class="$style.users">
|
<div :class="$style.users">
|
||||||
<div v-for="u in users" :key="u.id" :class="$style.user">
|
<div v-for="u in users" :key="u.id" :class="$style.user">
|
||||||
<MkAvatar :class="$style.avatar" :user="u"/>
|
<MkAvatar :class="$style.avatar" :user="u"/>
|
||||||
<span class="_nowrap">{{ u.name ?? u.username }}</span>
|
<MkUserName :user="u" :nowrap="true"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="users.length > 10">+{{ count - 10 }}</div>
|
<div v-if="users.length > 10">+{{ count - 10 }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div v-adaptive-bg :class="[$style.root, { yellow: user.isSilenced, red: user.isSuspended, gray: false }]">
|
<div v-adaptive-bg :class="[$style.root, { yellow: user.isSilenced, red: user.isSuspended, gray: false }]">
|
||||||
<MkAvatar class="avatar" :user="user" indicator/>
|
<MkAvatar class="avatar" :user="user" indicator/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span class="name _nowrap">{{ user.name ?? user.username }}</span>
|
<span class="name"><MkUserName class="name" :user="user"/></span>
|
||||||
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
||||||
</div>
|
</div>
|
||||||
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
|
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''"></div>
|
<div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''"></div>
|
||||||
<MkAvatar class="avatar" :user="user" indicator/>
|
<MkAvatar class="avatar" :user="user" indicator/>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<MkA class="name _nowrap" :to="userPage(user)">{{ user.name ?? user.username }}</MkA>
|
<MkA class="name" :to="userPage(user)"><MkUserName :user="user" :nowrap="false"/></MkA>
|
||||||
<p class="username"><MkAcct :user="user"/></p>
|
<p class="username"><MkAcct :user="user"/></p>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="$i && $i.id !== user.id && user.isFollowed" class="followed">{{ $ts.followsYou }}</span>
|
<span v-if="$i && $i.id !== user.id && user.isFollowed" class="followed">{{ $ts.followsYou }}</span>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<MkAvatar class="avatar" :user="user" indicator/>
|
<MkAvatar class="avatar" :user="user" indicator/>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<MkA class="name _nowrap" :to="userPage(user)">{{ user.name ?? user.username }}</MkA>
|
<MkA class="name" :to="userPage(user)"><MkUserName :user="user" :nowrap="false"/></MkA>
|
||||||
<p class="username"><MkAcct :user="user"/></p>
|
<p class="username"><MkAcct :user="user"/></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<div v-for="user in users" :key="user.id" class="_button" :class="[$style.user, { [$style.selected]: selected && selected.id === user.id }]" @click="selected = user" @dblclick="ok()">
|
<div v-for="user in users" :key="user.id" class="_button" :class="[$style.user, { [$style.selected]: selected && selected.id === user.id }]" @click="selected = user" @dblclick="ok()">
|
||||||
<MkAvatar :user="user" :class="$style.avatar" indicator/>
|
<MkAvatar :user="user" :class="$style.avatar" indicator/>
|
||||||
<div :class="$style.userBody">
|
<div :class="$style.userBody">
|
||||||
<span :class="$style.userName" class="_nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName :user="user" :class="$style.userName"/>
|
||||||
<MkAcct :user="user" :class="$style.userAcct"/>
|
<MkAcct :user="user" :class="$style.userAcct"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<div v-for="user in recentUsers" :key="user.id" class="_button" :class="[$style.user, { [$style.selected]: selected && selected.id === user.id }]" @click="selected = user" @dblclick="ok()">
|
<div v-for="user in recentUsers" :key="user.id" class="_button" :class="[$style.user, { [$style.selected]: selected && selected.id === user.id }]" @click="selected = user" @dblclick="ok()">
|
||||||
<MkAvatar :user="user" :class="$style.avatar" indicator/>
|
<MkAvatar :user="user" :class="$style.avatar" indicator/>
|
||||||
<div :class="$style.userBody">
|
<div :class="$style.userBody">
|
||||||
<span :class="$style.userName" class="_nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName :user="user" :class="$style.userName"/>
|
||||||
<MkAcct :user="user" :class="$style.userAcct"/>
|
<MkAcct :user="user" :class="$style.userAcct"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div :class="$style.root">
|
<div :class="$style.root">
|
||||||
<div v-for="u in users" :key="u.id" :class="$style.user">
|
<div v-for="u in users" :key="u.id" :class="$style.user">
|
||||||
<MkAvatar :class="$style.avatar" :user="u"/>
|
<MkAvatar :class="$style.avatar" :user="u"/>
|
||||||
<span :class="$style.name" class="_nowrap">{{ u.name ?? u.username }}</span>
|
<MkUserName :class="$style.name" :user="u" :nowrap="true"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="users.length < count" :class="$style.omitted">+{{ count - users.length }}</div>
|
<div v-if="users.length < count" :class="$style.omitted">+{{ count - users.length }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<MfmCore :text="text" :plain="plain" :nowrap="nowrap" :author="author" :is-note="isNote" :class="[$style.root, { '_nowrap': nowrap }]"/>
|
<MfmCore :text="text" :plain="plain" :nowrap="nowrap" :author="author" :is-note="isNote" :class="[$style.root, { [$style.nowrap]: nowrap }]"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -160,5 +160,12 @@ const props = withDefaults(defineProps<{
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.root {
|
.root {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|
||||||
|
&.nowrap {
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal; // https://codeday.me/jp/qa/20190424/690106.html
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<i v-else-if="metadata.icon" :class="[$style.titleIcon, metadata.icon]"></i>
|
<i v-else-if="metadata.icon" :class="[$style.titleIcon, metadata.icon]"></i>
|
||||||
|
|
||||||
<div :class="$style.title">
|
<div :class="$style.title">
|
||||||
<span v-if="metadata.userName" class="_nowrap">{{ metadata.userName.name ?? metadata.userName.username }}</span>
|
<MkUserName v-if="metadata.userName" :user="metadata.userName" :nowrap="true"/>
|
||||||
<div v-else-if="metadata.title">{{ metadata.title }}</div>
|
<div v-else-if="metadata.title">{{ metadata.title }}</div>
|
||||||
<div v-if="!narrow && metadata.subtitle" :class="$style.subtitle">
|
<div v-if="!narrow && metadata.subtitle" :class="$style.subtitle">
|
||||||
{{ metadata.subtitle }}
|
{{ metadata.subtitle }}
|
||||||
|
|
15
packages/frontend/src/components/global/MkUserName.vue
Normal file
15
packages/frontend/src/components/global/MkUserName.vue
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<template>
|
||||||
|
<Mfm :text="user.name ?? user.username" :author="user" :plain="true" :nowrap="nowrap" :emoji-urls="user.emojis"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { } from 'vue';
|
||||||
|
import * as misskey from 'misskey-js';
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
user: misskey.entities.User;
|
||||||
|
nowrap?: boolean;
|
||||||
|
}>(), {
|
||||||
|
nowrap: true,
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -6,6 +6,7 @@ import MkAcct from './global/MkAcct.vue';
|
||||||
import MkAvatar from './global/MkAvatar.vue';
|
import MkAvatar from './global/MkAvatar.vue';
|
||||||
import MkEmoji from './global/MkEmoji.vue';
|
import MkEmoji from './global/MkEmoji.vue';
|
||||||
import MkCustomEmoji from './global/MkCustomEmoji.vue';
|
import MkCustomEmoji from './global/MkCustomEmoji.vue';
|
||||||
|
import MkUserName from './global/MkUserName.vue';
|
||||||
import MkEllipsis from './global/MkEllipsis.vue';
|
import MkEllipsis from './global/MkEllipsis.vue';
|
||||||
import MkTime from './global/MkTime.vue';
|
import MkTime from './global/MkTime.vue';
|
||||||
import MkUrl from './global/MkUrl.vue';
|
import MkUrl from './global/MkUrl.vue';
|
||||||
|
@ -27,6 +28,7 @@ export default function(app: App) {
|
||||||
app.component('MkAvatar', MkAvatar);
|
app.component('MkAvatar', MkAvatar);
|
||||||
app.component('MkEmoji', MkEmoji);
|
app.component('MkEmoji', MkEmoji);
|
||||||
app.component('MkCustomEmoji', MkCustomEmoji);
|
app.component('MkCustomEmoji', MkCustomEmoji);
|
||||||
|
app.component('MkUserName', MkUserName);
|
||||||
app.component('MkEllipsis', MkEllipsis);
|
app.component('MkEllipsis', MkEllipsis);
|
||||||
app.component('MkTime', MkTime);
|
app.component('MkTime', MkTime);
|
||||||
app.component('MkUrl', MkUrl);
|
app.component('MkUrl', MkUrl);
|
||||||
|
@ -48,6 +50,7 @@ declare module '@vue/runtime-core' {
|
||||||
MkAvatar: typeof MkAvatar;
|
MkAvatar: typeof MkAvatar;
|
||||||
MkEmoji: typeof MkEmoji;
|
MkEmoji: typeof MkEmoji;
|
||||||
MkCustomEmoji: typeof MkCustomEmoji;
|
MkCustomEmoji: typeof MkCustomEmoji;
|
||||||
|
MkUserName: typeof MkUserName;
|
||||||
MkEllipsis: typeof MkEllipsis;
|
MkEllipsis: typeof MkEllipsis;
|
||||||
MkTime: typeof MkTime;
|
MkTime: typeof MkTime;
|
||||||
MkUrl: typeof MkUrl;
|
MkUrl: typeof MkUrl;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<Mfm :text="clip.description" :is-note="false" :i="$i"/>
|
<Mfm :text="clip.description" :is-note="false" :i="$i"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<MkAvatar :user="clip.user" class="avatar" indicator link preview/> <span class="_nowrap">{{ clip.user.name ?? clip.user.username }}</span>
|
<MkAvatar :user="clip.user" class="avatar" indicator link preview/> <MkUserName :user="clip.user" :nowrap="false"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<MkAvatar class="avatar" :user="req.follower" indicator link preview/>
|
<MkAvatar class="avatar" :user="req.follower" indicator link preview/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<MkA v-user-preview="req.follower.id" class="name _nowrap" :to="userPage(req.follower)">{{ req.follower.name ?? req.follower.username }}</MkA>
|
<MkA v-user-preview="req.follower.id" class="name" :to="userPage(req.follower)"><MkUserName :user="req.follower"/></MkA>
|
||||||
<p class="acct">@{{ acct(req.follower) }}</p>
|
<p class="acct">@{{ acct(req.follower) }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="req.follower.description" class="description" :title="req.follower.description">
|
<div v-if="req.follower.description" class="description" :title="req.follower.description">
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<MkAvatar :user="post.user" class="avatar" link preview/>
|
<MkAvatar :user="post.user" class="avatar" link preview/>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="_nowrap">{{ post.user.name ?? post.user.username }}</div>
|
<MkUserName :user="post.user" style="display: block;"/>
|
||||||
<MkAcct :user="post.user"/>
|
<MkAcct :user="post.user"/>
|
||||||
</div>
|
</div>
|
||||||
<MkFollowButton v-if="!$i || $i.id != post.user.id" :user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
<MkFollowButton v-if="!$i || $i.id != post.user.id" :user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<MkTime :time="message.createdAt" class="time"/>
|
<MkTime :time="message.createdAt" class="time"/>
|
||||||
</header>
|
</header>
|
||||||
<header v-else>
|
<header v-else>
|
||||||
<span class="name">{{ isMe(message) ? message.recipient.name : message.user.name }}</span>
|
<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span>
|
||||||
<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span>
|
<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span>
|
||||||
<MkTime :time="message.createdAt" class="time"/>
|
<MkTime :time="message.createdAt" class="time"/>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div v-for="user in users" :key="user.id" class="user _panel">
|
<div v-for="user in users" :key="user.id" class="user _panel">
|
||||||
<MkAvatar :user="user" class="avatar" indicator link preview/>
|
<MkAvatar :user="user" class="avatar" indicator link preview/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span class="name _nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName :user="user" class="name"/>
|
||||||
<MkAcct :user="user" class="acct"/>
|
<MkAcct :user="user" class="acct"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<b>{{ item.name }}</b>
|
<b>{{ item.name }}</b>
|
||||||
<div v-if="item.description" class="description">{{ item.description }}</div>
|
<div v-if="item.description" class="description">{{ item.description }}</div>
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<MkAvatar :user="item.user" class="avatar" indicator link preview/> <span class="_nowrap">{{ item.user.name ?? item.user.username }}</span>
|
<MkAvatar :user="item.user" class="avatar" indicator link preview/> <MkUserName :user="item.user" :nowrap="false"/>
|
||||||
</div>
|
</div>
|
||||||
</MkA>
|
</MkA>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<MkAvatar :user="page.user" class="avatar" link preview/>
|
<MkAvatar :user="page.user" class="avatar" link preview/>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="_nowrap">{{ page.user.name ?? page.user.username }}</div>
|
<MkUserName :user="page.user" style="display: block;"/>
|
||||||
<MkAcct :user="page.user"/>
|
<MkAcct :user="page.user"/>
|
||||||
</div>
|
</div>
|
||||||
<MkFollowButton v-if="!$i || $i.id != page.user.id" :user="page.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
<MkFollowButton v-if="!$i || $i.id != page.user.id" :user="page.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
<MkAvatar :user="account" class="avatar"/>
|
<MkAvatar :user="account" class="avatar"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="name _nowrap">{{ account.name ?? account.username }}</div>
|
<div class="name">
|
||||||
|
<MkUserName :user="account"/>
|
||||||
|
</div>
|
||||||
<div class="acct">
|
<div class="acct">
|
||||||
<MkAcct :user="account"/>
|
<MkAcct :user="account"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="aeakzknw">
|
<div class="aeakzknw">
|
||||||
<MkAvatar class="avatar" :user="user" indicator link preview/>
|
<MkAvatar class="avatar" :user="user" indicator link preview/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span class="name _nowrap">{{ user.name ?? user.username }}</span>
|
<span class="name"><MkUserName class="name" :user="user"/></span>
|
||||||
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
||||||
<span class="state">
|
<span class="state">
|
||||||
<span v-if="suspended" class="suspended">Suspended</span>
|
<span v-if="suspended" class="suspended">Suspended</span>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div ref="bannerEl" class="banner" :style="style"></div>
|
<div ref="bannerEl" class="banner" :style="style"></div>
|
||||||
<div class="fade"></div>
|
<div class="fade"></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="name _nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName class="name" :user="user" :nowrap="true"/>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
||||||
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ti ti-shield"></i></span>
|
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ti ti-shield"></i></span>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
<MkAvatar class="avatar" :user="user" indicator/>
|
<MkAvatar class="avatar" :user="user" indicator/>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="name _nowrap">{{ user.name ?? user.username }}</span>
|
<MkUserName :user="user" :nowrap="false" class="name"/>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
<span class="username"><MkAcct :user="user" :detail="true"/></span>
|
||||||
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ti ti-shield"></i></span>
|
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--badge);"><i class="ti ti-shield"></i></span>
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.bodyContainer">
|
<div :class="$style.bodyContainer">
|
||||||
<div :class="$style.body">
|
<div :class="$style.body">
|
||||||
<MkA :class="$style.name" :to="userPage($i)" class="_nowrap">{{ $i.name ?? $i.username }}</MkA>
|
<MkA :class="$style.name" :to="userPage($i)">
|
||||||
|
<MkUserName :user="$i"/>
|
||||||
|
</MkA>
|
||||||
<div :class="$style.username"><MkAcct :user="$i" detail/></div>
|
<div :class="$style.username"><MkAcct :user="$i" detail/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue