This commit is contained in:
syuilo 2018-04-09 19:23:52 +09:00
parent 2560d3d1c1
commit 48d540e9f4
4 changed files with 6 additions and 6 deletions

View file

@ -10,6 +10,6 @@ Vue.filter('userName', user => {
return getUserName(user); return getUserName(user);
}); });
Vue.filter('userPage', user => { Vue.filter('userPage', (user, path?) => {
return '/@' + Vue.filter('acct')(user); return '/@' + Vue.filter('acct')(user) + (path ? '/' + path : '');
}); });

View file

@ -57,7 +57,7 @@ init(async (launch) => {
{ 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/:note', component: MkNote } { path: '/notes/:note', component: MkNote }
] ]
}); });

View file

@ -68,7 +68,7 @@ init((launch) => {
{ 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/:note', component: MkNote } { path: '/notes/:note', component: MkNote }
] ]
}); });

View file

@ -30,11 +30,11 @@
<b>{{ user.notesCount | number }}</b> <b>{{ user.notesCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.notes%</i> <i>%i18n:mobile.tags.mk-user.notes%</i>
</a> </a>
<a :href="`${user | userPage}/following`"> <a :href="user | userPage('following')">
<b>{{ user.followingCount | number }}</b> <b>{{ user.followingCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.following%</i> <i>%i18n:mobile.tags.mk-user.following%</i>
</a> </a>
<a :href="`${user | userPage}/followers`"> <a :href="user | userPage('followers')">
<b>{{ user.followersCount | number }}</b> <b>{{ user.followersCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.followers%</i> <i>%i18n:mobile.tags.mk-user.followers%</i>
</a> </a>