Merge pull request #1313 from akihikodaki/key

Replace /:user endpoints with /@:user
This commit is contained in:
syuilo 2018-03-27 12:57:52 +09:00 committed by GitHub
commit d0c875c1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 127 deletions

View file

@ -121,7 +121,7 @@ class LineBot extends BotCore {
actions.push({ actions.push({
type: 'uri', type: 'uri',
label: 'Webで見る', label: 'Webで見る',
uri: `${config.url}/${user.username}` uri: `${config.url}/@${user.username}`
}); });
this.reply([{ this.reply([{

View file

@ -296,7 +296,7 @@ export const packForAp = (
if (!_user) return reject('invalid user arg.'); if (!_user) return reject('invalid user arg.');
const userUrl = `${config.url}/${_user.username}`; const userUrl = `${config.url}/@${_user.username}`;
resolve({ resolve({
"@context": ["https://www.w3.org/ns/activitystreams", { "@context": ["https://www.w3.org/ns/activitystreams", {

View file

@ -47,8 +47,8 @@ process.on('message', async msg => {
const user = game.user1_id == id ? game.user2 : game.user1; const user = game.user1_id == id ? game.user2 : game.user1;
const isSettai = form[0].value === 0; const isSettai = form[0].value === 0;
const text = isSettai const text = isSettai
? `?[${user.name}](${conf.url}/${user.username})さんの接待を始めました!` ? `?[${user.name}](${conf.url}/@${user.username})さんの接待を始めました!`
: `対局を?[${user.name}](${conf.url}/${user.username})さんと始めました! (強さ${form[0].value})`; : `対局を?[${user.name}](${conf.url}/@${user.username})さんと始めました! (強さ${form[0].value})`;
const res = await request.post(`${conf.api_url}/posts/create`, { const res = await request.post(`${conf.api_url}/posts/create`, {
json: { i, json: { i,
@ -72,15 +72,15 @@ process.on('message', async msg => {
const isSettai = form[0].value === 0; const isSettai = form[0].value === 0;
const text = isSettai const text = isSettai
? msg.body.winner_id === null ? msg.body.winner_id === null
? `?[${user.name}](${conf.url}/${user.username})さんに接待で引き分けました...` ? `?[${user.name}](${conf.url}/@${user.username})さんに接待で引き分けました...`
: msg.body.winner_id == id : msg.body.winner_id == id
? `?[${user.name}](${conf.url}/${user.username})さんに接待で勝ってしまいました...` ? `?[${user.name}](${conf.url}/@${user.username})さんに接待で勝ってしまいました...`
: `?[${user.name}](${conf.url}/${user.username})さんに接待で負けてあげました♪` : `?[${user.name}](${conf.url}/@${user.username})さんに接待で負けてあげました♪`
: msg.body.winner_id === null : msg.body.winner_id === null
? `?[${user.name}](${conf.url}/${user.username})さんと引き分けました~` ? `?[${user.name}](${conf.url}/@${user.username})さんと引き分けました~`
: msg.body.winner_id == id : msg.body.winner_id == id
? `?[${user.name}](${conf.url}/${user.username})さんに勝ちました♪` ? `?[${user.name}](${conf.url}/@${user.username})さんに勝ちました♪`
: `?[${user.name}](${conf.url}/${user.username})さんに負けました...`; : `?[${user.name}](${conf.url}/@${user.username})さんに負けました...`;
await request.post(`${conf.api_url}/posts/create`, { await request.post(`${conf.api_url}/posts/create`, {
json: { i, json: { i,

View file

@ -165,7 +165,7 @@
<mk-channel-post> <mk-channel-post>
<header> <header>
<a class="index" @click="reply">{ post.index }:</a> <a class="index" @click="reply">{ post.index }:</a>
<a class="name" href={ _URL_ + '/' + post.user.username }><b>{ post.user.name }</b></a> <a class="name" href={ _URL_ + '/@' + post.user.username }><b>{ post.user.name }</b></a>
<mk-time time={ post.created_at }/> <mk-time time={ post.created_at }/>
<mk-time time={ post.created_at } mode="detail"/> <mk-time time={ post.created_at } mode="detail"/>
<span>ID:<i>{ post.user.username }</i></span> <span>ID:<i>{ post.user.username }</i></span>

View file

@ -4,7 +4,7 @@
</div> </div>
<div> <div>
<a v-if="!$root.$data.os.isSignedIn" href={ _URL_ }>ログイン(新規登録)</a> <a v-if="!$root.$data.os.isSignedIn" href={ _URL_ }>ログイン(新規登録)</a>
<a v-if="$root.$data.os.isSignedIn" href={ _URL_ + '/' + I.username }>{ I.username }</a> <a v-if="$root.$data.os.isSignedIn" href={ _URL_ + '/@' + I.username }>{ I.username }</a>
</div> </div>
<style lang="stylus" scoped> <style lang="stylus" scoped>
:scope :scope

View file

@ -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="`/${message.user.username}`" :title="message.user.username" target="_blank"> <router-link class="avatar-anchor" :to="`/@${message.user.username}`" :title="message.user.username" target="_blank">
<img class="avatar" :src="`${message.user.avatar_url}?thumbnail&size=80`" alt=""/> <img class="avatar" :src="`${message.user.avatar_url}?thumbnail&size=80`" alt=""/>
</router-link> </router-link>
<div class="content"> <div class="content">

View file

@ -61,7 +61,7 @@ export default Vue.component('mk-post-html', {
case 'mention': case 'mention':
return (createElement as any)('a', { return (createElement as any)('a', {
attrs: { attrs: {
href: `${url}/${token.username}`, href: `${url}/@${token.username}`,
target: '_blank', target: '_blank',
dataIsMe: (this as any).i && (this as any).i.username == token.username dataIsMe: (this as any).i && (this as any).i.username == token.username
}, },

View file

@ -3,7 +3,7 @@
<label class="username"> <label class="username">
<p class="caption">%fa:at%%i18n:common.tags.mk-signup.username%</p> <p class="caption">%fa:at%%i18n:common.tags.mk-signup.username%</p>
<input v-model="username" type="text" pattern="^[a-zA-Z0-9-]{3,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required @input="onChangeUsername"/> <input v-model="username" type="text" pattern="^[a-zA-Z0-9-]{3,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required @input="onChangeUsername"/>
<p class="profile-page-url-preview" v-if="shouldShowProfileUrl">{{ `${url}/${username}` }}</p> <p class="profile-page-url-preview" v-if="shouldShowProfileUrl">{{ `${url}/@${username}` }}</p>
<p class="info" v-if="usernameState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%%i18n:common.tags.mk-signup.checking%</p> <p class="info" v-if="usernameState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%%i18n:common.tags.mk-signup.checking%</p>
<p class="info" v-if="usernameState == 'ok'" style="color:#3CB7B5">%fa:check .fw%%i18n:common.tags.mk-signup.available%</p> <p class="info" v-if="usernameState == 'ok'" style="color:#3CB7B5">%fa:check .fw%%i18n:common.tags.mk-signup.available%</p>
<p class="info" v-if="usernameState == 'unavailable'" style="color:#FF1161">%fa:exclamation-triangle .fw%%i18n:common.tags.mk-signup.unavailable%</p> <p class="info" v-if="usernameState == 'unavailable'" style="color:#FF1161">%fa:exclamation-triangle .fw%%i18n:common.tags.mk-signup.unavailable%</p>

View file

@ -1,15 +1,15 @@
<template> <template>
<div class="mk-welcome-timeline"> <div class="mk-welcome-timeline">
<div v-for="post in posts"> <div v-for="post in posts">
<router-link class="avatar-anchor" :to="`/${post.user.username}`" v-user-preview="post.user.id"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`" v-user-preview="post.user.id">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/>
</router-link> </router-link>
<div class="body"> <div class="body">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`" v-user-preview="post.user.id">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`" v-user-preview="post.user.id">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<div class="info"> <div class="info">
<router-link class="created-at" :to="`/${post.user.username}/${post.id}`"> <router-link class="created-at" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</div> </div>

View file

@ -83,8 +83,8 @@ init(async (launch) => {
{ path: '/search', component: MkSearch }, { path: '/search', component: MkSearch },
{ path: '/othello', component: MkOthello }, { path: '/othello', component: MkOthello },
{ path: '/othello/:game', component: MkOthello }, { path: '/othello/:game', component: MkOthello },
{ path: '/:user', component: MkUser }, { path: '/@:user', component: MkUser },
{ path: '/:user/:post', component: MkPost } { path: '/@:user/:post', component: MkPost }
]); ]);
}, true); }, true);

View file

@ -3,11 +3,11 @@
<p class="title">気になるユーザーをフォロー:</p> <p class="title">気になるユーザーをフォロー:</p>
<div class="users" v-if="!fetching && users.length > 0"> <div class="users" v-if="!fetching && users.length > 0">
<div class="user" v-for="user in users" :key="user.id"> <div class="user" v-for="user in users" :key="user.id">
<router-link class="avatar-anchor" :to="`/${user.username}`"> <router-link class="avatar-anchor" :to="`/@${user.username}`">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="user.id"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
</router-link> </router-link>
<div class="body"> <div class="body">
<router-link class="name" :to="`/${user.username}`" v-user-preview="user.id">{{ user.name }}</router-link> <router-link class="name" :to="`/@${user.username}`" v-user-preview="user.id">{{ user.name }}</router-link>
<p class="username">@{{ user.username }}</p> <p class="username">@{{ user.username }}</p>
</div> </div>
<mk-follow-button :user="user"/> <mk-follow-button :user="user"/>

View file

@ -5,82 +5,82 @@
<div class="notification" :class="notification.type" :key="notification.id"> <div class="notification" :class="notification.type" :key="notification.id">
<mk-time :time="notification.created_at"/> <mk-time :time="notification.created_at"/>
<template v-if="notification.type == 'reaction'"> <template v-if="notification.type == 'reaction'">
<router-link class="avatar-anchor" :to="`/${notification.user.username}`" v-user-preview="notification.user.id"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p> <p>
<mk-reaction-icon :reaction="notification.reaction"/> <mk-reaction-icon :reaction="notification.reaction"/>
<router-link :to="`/${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</router-link> <router-link :to="`/@${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</router-link>
</p> </p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right% %fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%
</router-link> </router-link>
</div> </div>
</template> </template>
<template v-if="notification.type == 'repost'"> <template v-if="notification.type == 'repost'">
<router-link class="avatar-anchor" :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id"> <router-link class="avatar-anchor" :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:retweet% <p>%fa:retweet%
<router-link :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> <router-link :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
</p> </p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right% %fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%
</router-link> </router-link>
</div> </div>
</template> </template>
<template v-if="notification.type == 'quote'"> <template v-if="notification.type == 'quote'">
<router-link class="avatar-anchor" :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id"> <router-link class="avatar-anchor" :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:quote-left% <p>%fa:quote-left%
<router-link :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> <router-link :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
</p> </p>
<router-link class="post-preview" :to="`/${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link> <router-link class="post-preview" :to="`/@${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link>
</div> </div>
</template> </template>
<template v-if="notification.type == 'follow'"> <template v-if="notification.type == 'follow'">
<router-link class="avatar-anchor" :to="`/${notification.user.username}`" v-user-preview="notification.user.id"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:user-plus% <p>%fa:user-plus%
<router-link :to="`/${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</router-link> <router-link :to="`/@${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</router-link>
</p> </p>
</div> </div>
</template> </template>
<template v-if="notification.type == 'reply'"> <template v-if="notification.type == 'reply'">
<router-link class="avatar-anchor" :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id"> <router-link class="avatar-anchor" :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:reply% <p>%fa:reply%
<router-link :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> <router-link :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
</p> </p>
<router-link class="post-preview" :to="`/${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link> <router-link class="post-preview" :to="`/@${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link>
</div> </div>
</template> </template>
<template v-if="notification.type == 'mention'"> <template v-if="notification.type == 'mention'">
<router-link class="avatar-anchor" :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id"> <router-link class="avatar-anchor" :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:at% <p>%fa:at%
<router-link :to="`/${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> <router-link :to="`/@${notification.post.user.username}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link>
</p> </p>
<a class="post-preview" :href="`/${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</a> <a class="post-preview" :href="`/@${notification.post.user.username}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</a>
</div> </div>
</template> </template>
<template v-if="notification.type == 'poll_vote'"> <template v-if="notification.type == 'poll_vote'">
<router-link class="avatar-anchor" :to="`/${notification.user.username}`" v-user-preview="notification.user.id"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`" v-user-preview="notification.user.id">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p>%fa:chart-pie%<a :href="`/${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</a></p> <p>%fa:chart-pie%<a :href="`/@${notification.user.username}`" v-user-preview="notification.user.id">{{ notification.user.name }}</a></p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right% %fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%
</router-link> </router-link>
</div> </div>

View file

@ -1,16 +1,16 @@
<template> <template>
<div class="sub" :title="title"> <div class="sub" :title="title">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<div class="left"> <div class="left">
<router-link class="name" :to="`/${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
</div> </div>
<div class="right"> <div class="right">
<router-link class="time" :to="`/${post.user.username}/${post.id}`"> <router-link class="time" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</div> </div>

View file

@ -18,22 +18,22 @@
</div> </div>
<div class="repost" v-if="isRepost"> <div class="repost" v-if="isRepost">
<p> <p>
<router-link class="avatar-anchor" :to="`/${post.user.username}`" v-user-preview="post.user_id"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`" v-user-preview="post.user_id">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
</router-link> </router-link>
%fa:retweet% %fa:retweet%
<router-link class="name" :href="`/${post.user.username}`">{{ post.user.name }}</router-link> <router-link class="name" :href="`/@${post.user.username}`">{{ post.user.name }}</router-link>
がRepost がRepost
</p> </p>
</div> </div>
<article> <article>
<router-link class="avatar-anchor" :to="`/${p.user.username}`"> <router-link class="avatar-anchor" :to="`/@${p.user.username}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link> </router-link>
<header> <header>
<router-link class="name" :to="`/${p.user.username}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link> <router-link class="name" :to="`/@${p.user.username}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link>
<span class="username">@{{ p.user.username }}</span> <span class="username">@{{ p.user.username }}</span>
<router-link class="time" :to="`/${p.user.username}/${p.id}`"> <router-link class="time" :to="`/@${p.user.username}/${p.id}`">
<mk-time :time="p.created_at"/> <mk-time :time="p.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -1,13 +1,13 @@
<template> <template>
<div class="mk-post-preview" :title="title"> <div class="mk-post-preview" :title="title">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<router-link class="time" :to="`/${post.user.username}/${post.id}`"> <router-link class="time" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -1,13 +1,13 @@
<template> <template>
<div class="sub" :title="title"> <div class="sub" :title="title">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<router-link class="created-at" :to="`/${post.user.username}/${post.id}`"> <router-link class="created-at" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -5,23 +5,23 @@
</div> </div>
<div class="repost" v-if="isRepost"> <div class="repost" v-if="isRepost">
<p> <p>
<router-link class="avatar-anchor" :to="`/${post.user.username}`" v-user-preview="post.user_id"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`" v-user-preview="post.user_id">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
</router-link> </router-link>
%fa:retweet% %fa:retweet%
<span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span> <span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span>
<a class="name" :href="`/${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</a> <a class="name" :href="`/@${post.user.username}`" v-user-preview="post.user_id">{{ post.user.name }}</a>
<span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr('%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span> <span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr('%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span>
</p> </p>
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</div> </div>
<article> <article>
<router-link class="avatar-anchor" :to="`/${p.user.username}`"> <router-link class="avatar-anchor" :to="`/@${p.user.username}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${p.user.username}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link> <router-link class="name" :to="`/@${p.user.username}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link>
<span class="is-bot" v-if="p.user.account.is_bot">bot</span> <span class="is-bot" v-if="p.user.account.is_bot">bot</span>
<span class="username">@{{ p.user.username }}</span> <span class="username">@{{ p.user.username }}</span>
<div class="info"> <div class="info">
@ -135,7 +135,7 @@ export default Vue.extend({
return dateStringify(this.p.created_at); return dateStringify(this.p.created_at);
}, },
url(): string { url(): string {
return `/${this.p.user.username}/${this.p.id}`; return `/@${this.p.user.username}/${this.p.id}`;
}, },
urls(): string[] { urls(): string[] {
if (this.p.ast) { if (this.p.ast) {

View file

@ -8,7 +8,7 @@
<div class="menu" v-if="isOpen"> <div class="menu" v-if="isOpen">
<ul> <ul>
<li> <li>
<router-link :to="`/${ os.i.username }`">%fa:user%%i18n:desktop.tags.mk-ui-header-account.profile%%fa:angle-right%</router-link> <router-link :to="`/@${ os.i.username }`">%fa:user%%i18n:desktop.tags.mk-ui-header-account.profile%%fa:angle-right%</router-link>
</li> </li>
<li @click="drive"> <li @click="drive">
<p>%fa:cloud%%i18n:desktop.tags.mk-ui-header-account.drive%%fa:angle-right%</p> <p>%fa:cloud%%i18n:desktop.tags.mk-ui-header-account.drive%%fa:angle-right%</p>

View file

@ -2,11 +2,11 @@
<div class="mk-user-preview"> <div class="mk-user-preview">
<template v-if="u != null"> <template v-if="u != null">
<div class="banner" :style="u.banner_url ? `background-image: url(${u.banner_url}?thumbnail&size=512)` : ''"></div> <div class="banner" :style="u.banner_url ? `background-image: url(${u.banner_url}?thumbnail&size=512)` : ''"></div>
<router-link class="avatar" :to="`/${u.username}`"> <router-link class="avatar" :to="`/@${u.username}`">
<img :src="`${u.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img :src="`${u.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="title"> <div class="title">
<router-link class="name" :to="`/${u.username}`">{{ u.name }}</router-link> <router-link class="name" :to="`/@${u.username}`">{{ u.name }}</router-link>
<p class="username">@{{ u.username }}</p> <p class="username">@{{ u.username }}</p>
</div> </div>
<div class="description">{{ u.description }}</div> <div class="description">{{ u.description }}</div>

View file

@ -1,11 +1,11 @@
<template> <template>
<div class="root item"> <div class="root item">
<router-link class="avatar-anchor" :to="`/${user.username}`" v-user-preview="user.id"> <router-link class="avatar-anchor" :to="`/@${user.username}`" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${user.username}`" v-user-preview="user.id">{{ user.name }}</router-link> <router-link class="name" :to="`/@${user.username}`" v-user-preview="user.id">{{ user.name }}</router-link>
<span class="username">@{{ user.username }}</span> <span class="username">@{{ user.username }}</span>
</header> </header>
<div class="body"> <div class="body">

View file

@ -3,7 +3,7 @@
<p class="title">%fa:users%%i18n:desktop.tags.mk-user.followers-you-know.title%</p> <p class="title">%fa:users%%i18n:desktop.tags.mk-user.followers-you-know.title%</p>
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.followers-you-know.loading%<mk-ellipsis/></p> <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.followers-you-know.loading%<mk-ellipsis/></p>
<div v-if="!fetching && users.length > 0"> <div v-if="!fetching && users.length > 0">
<router-link v-for="user in users" :to="`/${user.username}`" :key="user.id"> <router-link v-for="user in users" :to="`/@${user.username}`" :key="user.id">
<img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/> <img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/>
</router-link> </router-link>
</div> </div>

View file

@ -4,11 +4,11 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.frequently-replied-users.loading%<mk-ellipsis/></p> <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.frequently-replied-users.loading%<mk-ellipsis/></p>
<template v-if="!fetching && users.length != 0"> <template v-if="!fetching && users.length != 0">
<div class="user" v-for="friend in users"> <div class="user" v-for="friend in users">
<router-link class="avatar-anchor" :to="`/${friend.username}`"> <router-link class="avatar-anchor" :to="`/@${friend.username}`">
<img class="avatar" :src="`${friend.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/> <img class="avatar" :src="`${friend.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/>
</router-link> </router-link>
<div class="body"> <div class="body">
<router-link class="name" :to="`/${friend.username}`" v-user-preview="friend.id">{{ friend.name }}</router-link> <router-link class="name" :to="`/@${friend.username}`" v-user-preview="friend.id">{{ friend.name }}</router-link>
<p class="username">@{{ friend.username }}</p> <p class="username">@{{ friend.username }}</p>
</div> </div>
<mk-follow-button :user="friend"/> <mk-follow-button :user="friend"/>

View file

@ -12,9 +12,9 @@
<p class="location" v-if="user.account.profile.location">%fa:map-marker%{{ user.account.profile.location }}</p> <p class="location" v-if="user.account.profile.location">%fa:map-marker%{{ user.account.profile.location }}</p>
</div> </div>
<footer> <footer>
<router-link :to="`/${user.username}`" :data-active="$parent.page == 'home'">%fa:home%概要</router-link> <router-link :to="`/@${user.username}`" :data-active="$parent.page == 'home'">%fa:home%概要</router-link>
<router-link :to="`/${user.username}/media`" :data-active="$parent.page == 'media'">%fa:image%メディア</router-link> <router-link :to="`/@${user.username}/media`" :data-active="$parent.page == 'media'">%fa:image%メディア</router-link>
<router-link :to="`/${user.username}/graphs`" :data-active="$parent.page == 'graphs'">%fa:chart-bar%グラフ</router-link> <router-link :to="`/@${user.username}/graphs`" :data-active="$parent.page == 'graphs'">%fa:chart-bar%グラフ</router-link>
</footer> </footer>
</div> </div>
</div> </div>

View file

@ -8,7 +8,7 @@
<p>ようこそ <b>Misskey</b>はTwitter風ミニブログSNSです思ったことや皆と共有したいことを投稿しましょうタイムラインを見れば皆の関心事をすぐにチェックすることもできます<a :href="aboutUrl">詳しく...</a></p> <p>ようこそ <b>Misskey</b>はTwitter風ミニブログSNSです思ったことや皆と共有したいことを投稿しましょうタイムラインを見れば皆の関心事をすぐにチェックすることもできます<a :href="aboutUrl">詳しく...</a></p>
<p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p> <p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p>
<div class="users"> <div class="users">
<router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/${user.username}`" v-user-preview="user.id"> <router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${user.username}`" v-user-preview="user.id">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
</div> </div>

View file

@ -2,7 +2,7 @@
<div class="post"> <div class="post">
<header> <header>
<a class="index" @click="reply">{{ post.index }}:</a> <a class="index" @click="reply">{{ post.index }}:</a>
<router-link class="name" :to="`/${post.user.username}`" v-user-preview="post.user.id"><b>{{ post.user.name }}</b></router-link> <router-link class="name" :to="`/@${post.user.username}`" v-user-preview="post.user.id"><b>{{ post.user.name }}</b></router-link>
<span>ID:<i>{{ post.user.username }}</i></span> <span>ID:<i>{{ post.user.username }}</i></span>
</header> </header>
<div> <div>

View file

@ -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="`/${ poll.user.username }/${ poll.id }`">{{ poll.text }}</router-link></p> <p v-if="poll.text"><router-link to="`/@${ poll.user.username }/${ poll.id }`">{{ poll.text }}</router-link></p>
<p v-if="!poll.text"><router-link to="`/${ poll.user.username }/${ poll.id }`">%fa:link%</router-link></p> <p v-if="!poll.text"><router-link to="`/@${ poll.user.username }/${ poll.id }`">%fa:link%</router-link></p>
<mk-poll :post="poll"/> <mk-poll :post="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>

View file

@ -15,7 +15,7 @@
title="クリックでアバター編集" title="クリックでアバター編集"
v-user-preview="os.i.id" v-user-preview="os.i.id"
/> />
<router-link class="name" :to="`/${os.i.username}`">{{ os.i.name }}</router-link> <router-link class="name" :to="`/@${os.i.username}`">{{ os.i.name }}</router-link>
<p class="username">@{{ os.i.username }}</p> <p class="username">@{{ os.i.username }}</p>
</div> </div>
</template> </template>

View file

@ -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="post" v-else-if="post != null"> <div class="post" v-else-if="post != null">
<p class="text"><router-link :to="`/${ post.user.username }/${ post.id }`">{{ post.text }}</router-link></p> <p class="text"><router-link :to="`/@${ post.user.username }/${ post.id }`">{{ post.text }}</router-link></p>
<p class="author"><router-link :to="`/${ post.user.username }`">@{{ post.user.username }}</router-link></p> <p class="author"><router-link :to="`/@${ post.user.username }`">@{{ post.user.username }}</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>

View file

@ -7,11 +7,11 @@
<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>
<template v-else-if="users.length != 0"> <template v-else-if="users.length != 0">
<div class="user" v-for="_user in users"> <div class="user" v-for="_user in users">
<router-link class="avatar-anchor" :to="`/${_user.username}`"> <router-link class="avatar-anchor" :to="`/@${_user.username}`">
<img class="avatar" :src="`${_user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/> <img class="avatar" :src="`${_user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/>
</router-link> </router-link>
<div class="body"> <div class="body">
<router-link class="name" :to="`/${_user.username}`" v-user-preview="_user.id">{{ _user.name }}</router-link> <router-link class="name" :to="`/@${_user.username}`" v-user-preview="_user.id">{{ _user.name }}</router-link>
<p class="username">@{{ _user.username }}</p> <p class="username">@{{ _user.username }}</p>
</div> </div>
<mk-follow-button :user="_user"/> <mk-follow-button :user="_user"/>

View file

@ -71,9 +71,9 @@ init((launch) => {
{ path: '/search', component: MkSearch }, { path: '/search', component: MkSearch },
{ path: '/othello', component: MkOthello }, { path: '/othello', component: MkOthello },
{ path: '/othello/:game', component: MkOthello }, { path: '/othello/:game', component: MkOthello },
{ path: '/:user', component: MkUser }, { path: '/@:user', component: MkUser },
{ path: '/:user/followers', component: MkFollowers }, { path: '/@:user/followers', component: MkFollowers },
{ path: '/:user/following', component: MkFollowing }, { path: '/@:user/following', component: MkFollowing },
{ path: '/:user/:post', component: MkPost } { path: '/@:user/:post', component: MkPost }
]); ]);
}, true); }, true);

View file

@ -2,15 +2,15 @@
<div class="mk-notification"> <div class="mk-notification">
<div class="notification reaction" v-if="notification.type == 'reaction'"> <div class="notification reaction" v-if="notification.type == 'reaction'">
<mk-time :time="notification.created_at"/> <mk-time :time="notification.created_at"/>
<router-link class="avatar-anchor" :to="`/${notification.user.username}`"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p> <p>
<mk-reaction-icon :reaction="notification.reaction"/> <mk-reaction-icon :reaction="notification.reaction"/>
<router-link :to="`/${notification.user.username}`">{{ notification.user.name }}</router-link> <router-link :to="`/@${notification.user.username}`">{{ notification.user.name }}</router-link>
</p> </p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post) }} %fa:quote-left%{{ getPostSummary(notification.post) }}
%fa:quote-right% %fa:quote-right%
</router-link> </router-link>
@ -19,15 +19,15 @@
<div class="notification repost" v-if="notification.type == 'repost'"> <div class="notification repost" v-if="notification.type == 'repost'">
<mk-time :time="notification.created_at"/> <mk-time :time="notification.created_at"/>
<router-link class="avatar-anchor" :to="`/${notification.post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${notification.post.user.username}`">
<img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p> <p>
%fa:retweet% %fa:retweet%
<router-link :to="`/${notification.post.user.username}`">{{ notification.post.user.name }}</router-link> <router-link :to="`/@${notification.post.user.username}`">{{ notification.post.user.name }}</router-link>
</p> </p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right% %fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%
</router-link> </router-link>
</div> </div>
@ -39,13 +39,13 @@
<div class="notification follow" v-if="notification.type == 'follow'"> <div class="notification follow" v-if="notification.type == 'follow'">
<mk-time :time="notification.created_at"/> <mk-time :time="notification.created_at"/>
<router-link class="avatar-anchor" :to="`/${notification.user.username}`"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p> <p>
%fa:user-plus% %fa:user-plus%
<router-link :to="`/${notification.user.username}`">{{ notification.user.name }}</router-link> <router-link :to="`/@${notification.user.username}`">{{ notification.user.name }}</router-link>
</p> </p>
</div> </div>
</div> </div>
@ -60,15 +60,15 @@
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'"> <div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
<mk-time :time="notification.created_at"/> <mk-time :time="notification.created_at"/>
<router-link class="avatar-anchor" :to="`/${notification.user.username}`"> <router-link class="avatar-anchor" :to="`/@${notification.user.username}`">
<img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="text"> <div class="text">
<p> <p>
%fa:chart-pie% %fa:chart-pie%
<router-link :to="`/${notification.user.username}`">{{ notification.user.name }}</router-link> <router-link :to="`/@${notification.user.username}`">{{ notification.user.name }}</router-link>
</p> </p>
<router-link class="post-ref" :to="`/${notification.post.user.username}/${notification.post.id}`"> <router-link class="post-ref" :to="`/@${notification.post.user.username}/${notification.post.id}`">
%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right% %fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%
</router-link> </router-link>
</div> </div>

View file

@ -1,6 +1,6 @@
<template> <template>
<div class="mk-post-card"> <div class="mk-post-card">
<a :href="`/${post.user.username}/${post.id}`"> <a :href="`/@${post.user.username}/${post.id}`">
<header> <header>
<img :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/><h3>{{ post.user.name }}</h3> <img :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/><h3>{{ post.user.name }}</h3>
</header> </header>

View file

@ -1,13 +1,13 @@
<template> <template>
<div class="root sub"> <div class="root sub">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<router-link class="time" :to="`/${post.user.username}/${post.id}`"> <router-link class="time" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -17,11 +17,11 @@
</div> </div>
<div class="repost" v-if="isRepost"> <div class="repost" v-if="isRepost">
<p> <p>
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
</router-link> </router-link>
%fa:retweet% %fa:retweet%
<router-link class="name" :to="`/${post.user.username}`"> <router-link class="name" :to="`/@${post.user.username}`">
{{ post.user.name }} {{ post.user.name }}
</router-link> </router-link>
がRepost がRepost
@ -29,11 +29,11 @@
</div> </div>
<article> <article>
<header> <header>
<router-link class="avatar-anchor" :to="`/${p.user.username}`"> <router-link class="avatar-anchor" :to="`/@${p.user.username}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div> <div>
<router-link class="name" :to="`/${p.user.username}`">{{ p.user.name }}</router-link> <router-link class="name" :to="`/@${p.user.username}`">{{ p.user.name }}</router-link>
<span class="username">@{{ p.user.username }}</span> <span class="username">@{{ p.user.username }}</span>
</div> </div>
</header> </header>
@ -53,7 +53,7 @@
<mk-post-preview :post="p.repost"/> <mk-post-preview :post="p.repost"/>
</div> </div>
</div> </div>
<router-link class="time" :to="`/${p.user.username}/${p.id}`"> <router-link class="time" :to="`/@${p.user.username}/${p.id}`">
<mk-time :time="p.created_at" mode="detail"/> <mk-time :time="p.created_at" mode="detail"/>
</router-link> </router-link>
<footer> <footer>

View file

@ -1,13 +1,13 @@
<template> <template>
<div class="mk-post-preview"> <div class="mk-post-preview">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<router-link class="time" :to="`/${post.user.username}/${post.id}`"> <router-link class="time" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -1,13 +1,13 @@
<template> <template>
<div class="sub"> <div class="sub">
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${post.user.username}`">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`">{{ post.user.name }}</router-link>
<span class="username">@{{ post.user.username }}</span> <span class="username">@{{ post.user.username }}</span>
<router-link class="created-at" :to="`/${post.user.username}/${post.id}`"> <router-link class="created-at" :to="`/@${post.user.username}/${post.id}`">
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</router-link> </router-link>
</header> </header>

View file

@ -5,23 +5,23 @@
</div> </div>
<div class="repost" v-if="isRepost"> <div class="repost" v-if="isRepost">
<p> <p>
<router-link class="avatar-anchor" :to="`/${post.user.username}`"> <router-link class="avatar-anchor" :to="`/@${post.user.username}`">
<img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
%fa:retweet% %fa:retweet%
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span> <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="`/${post.user.username}`">{{ post.user.name }}</router-link> <router-link class="name" :to="`/@${post.user.username}`">{{ post.user.name }}</router-link>
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr('%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span> <span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr('%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span>
</p> </p>
<mk-time :time="post.created_at"/> <mk-time :time="post.created_at"/>
</div> </div>
<article> <article>
<router-link class="avatar-anchor" :to="`/${p.user.username}`"> <router-link class="avatar-anchor" :to="`/@${p.user.username}`">
<img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=96`" alt="avatar"/> <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=96`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${p.user.username}`">{{ p.user.name }}</router-link> <router-link class="name" :to="`/@${p.user.username}`">{{ p.user.name }}</router-link>
<span class="is-bot" v-if="p.user.account.is_bot">bot</span> <span class="is-bot" v-if="p.user.account.is_bot">bot</span>
<span class="username">@{{ p.user.username }}</span> <span class="username">@{{ p.user.username }}</span>
<div class="info"> <div class="info">
@ -110,7 +110,7 @@ export default Vue.extend({
: 0; : 0;
}, },
url(): string { url(): string {
return `/${this.p.user.username}/${this.p.id}`; return `/@${this.p.user.username}/${this.p.id}`;
}, },
urls(): string[] { urls(): string[] {
if (this.p.ast) { if (this.p.ast) {

View file

@ -9,7 +9,7 @@
</transition> </transition>
<transition name="nav"> <transition name="nav">
<div class="body" v-if="isOpen"> <div class="body" v-if="isOpen">
<router-link class="me" v-if="os.isSignedIn" :to="`/${os.i.username}`"> <router-link class="me" v-if="os.isSignedIn" :to="`/@${os.i.username}`">
<img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=128`" alt="avatar"/> <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=128`" alt="avatar"/>
<p class="name">{{ os.i.name }}</p> <p class="name">{{ os.i.name }}</p>
</router-link> </router-link>

View file

@ -1,11 +1,11 @@
<template> <template>
<div class="mk-user-card"> <div class="mk-user-card">
<header :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''"> <header :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''">
<a :href="`/${user.username}`"> <a :href="`/@${user.username}`">
<img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/> <img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/>
</a> </a>
</header> </header>
<a class="name" :href="`/${user.username}`" target="_blank">{{ user.name }}</a> <a class="name" :href="`/@${user.username}`" target="_blank">{{ user.name }}</a>
<p class="username">@{{ user.username }}</p> <p class="username">@{{ user.username }}</p>
<mk-follow-button :user="user"/> <mk-follow-button :user="user"/>
</div> </div>

View file

@ -1,11 +1,11 @@
<template> <template>
<div class="mk-user-preview"> <div class="mk-user-preview">
<router-link class="avatar-anchor" :to="`/${user.username}`"> <router-link class="avatar-anchor" :to="`/@${user.username}`">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="`/${user.username}`">{{ user.name }}</router-link> <router-link class="name" :to="`/@${user.username}`">{{ user.name }}</router-link>
<span class="username">@{{ user.username }}</span> <span class="username">@{{ user.username }}</span>
</header> </header>
<div class="body"> <div class="body">

View file

@ -30,11 +30,11 @@
<b>{{ user.posts_count | number }}</b> <b>{{ user.posts_count | number }}</b>
<i>%i18n:mobile.tags.mk-user.posts%</i> <i>%i18n:mobile.tags.mk-user.posts%</i>
</a> </a>
<a :href="`${user.username}/following`"> <a :href="`@${user.username}/following`">
<b>{{ user.following_count | number }}</b> <b>{{ user.following_count | number }}</b>
<i>%i18n:mobile.tags.mk-user.following%</i> <i>%i18n:mobile.tags.mk-user.following%</i>
</a> </a>
<a :href="`${user.username}/followers`"> <a :href="`@${user.username}/followers`">
<b>{{ user.followers_count | number }}</b> <b>{{ user.followers_count | number }}</b>
<i>%i18n:mobile.tags.mk-user.followers%</i> <i>%i18n:mobile.tags.mk-user.followers%</i>
</a> </a>

View file

@ -2,7 +2,7 @@
<div class="root followers-you-know"> <div class="root followers-you-know">
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:mobile.tags.mk-user-overview-followers-you-know.loading%<mk-ellipsis/></p> <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"> <div v-if="!fetching && users.length > 0">
<a v-for="user in users" :key="user.id" :href="`/${user.username}`"> <a v-for="user in users" :key="user.id" :href="`/@${user.username}`">
<img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name"/> <img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name"/>
</a> </a>
</div> </div>

View file

@ -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="`/${image.post.user.username}/${image.post.id}`" :href="`/@${image.post.user.username}/${image.post.id}`"
></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>

View file

@ -21,7 +21,7 @@
<mk-welcome-timeline/> <mk-welcome-timeline/>
</div> </div>
<div class="users"> <div class="users">
<router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/${user.username}`"> <router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${user.username}`">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/> <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link> </router-link>
</div> </div>

View file

@ -8,7 +8,7 @@
:src="`${os.i.avatar_url}?thumbnail&size=96`" :src="`${os.i.avatar_url}?thumbnail&size=96`"
alt="avatar" 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}`">{{ os.i.name }}</router-link>
</mk-widget-container> </mk-widget-container>
</div> </div>
</template> </template>