This commit is contained in:
syuilo 2018-04-09 19:23:52 +09:00
parent 1fc56be0d2
commit e901582838
4 changed files with 6 additions and 6 deletions

View file

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

View file

@ -57,7 +57,7 @@ init(async (launch) => {
{ path: '/othello', component: MkOthello },
{ path: '/othello/:game', component: MkOthello },
{ 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/followers', component: MkFollowers },
{ 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>
<i>%i18n:mobile.tags.mk-user.notes%</i>
</a>
<a :href="`${user | userPage}/following`">
<a :href="user | userPage('following')">
<b>{{ user.followingCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.following%</i>
</a>
<a :href="`${user | userPage}/followers`">
<a :href="user | userPage('followers')">
<b>{{ user.followersCount | number }}</b>
<i>%i18n:mobile.tags.mk-user.followers%</i>
</a>