From 834dc4903806cfb13156538a1784c1d766f3df67 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 27 Mar 2018 12:53:56 +0900 Subject: [PATCH] Replace /:user endpoints with /@:user --- src/api/bot/interfaces/line.ts | 2 +- src/api/models/user.ts | 2 +- src/common/othello/ai/back.ts | 16 ++++---- src/web/app/ch/tags/channel.tag | 2 +- src/web/app/ch/tags/header.tag | 2 +- .../components/messaging-room.message.vue | 2 +- .../app/common/views/components/post-html.ts | 2 +- .../app/common/views/components/signup.vue | 2 +- .../views/components/welcome-timeline.vue | 6 +-- src/web/app/desktop/script.ts | 4 +- .../views/components/friends-maker.vue | 4 +- .../views/components/notifications.vue | 40 +++++++++---------- .../views/components/post-detail.sub.vue | 6 +-- .../desktop/views/components/post-detail.vue | 10 ++--- .../desktop/views/components/post-preview.vue | 6 +-- .../views/components/posts.post.sub.vue | 6 +-- .../desktop/views/components/posts.post.vue | 10 ++--- .../views/components/ui.header.account.vue | 2 +- .../desktop/views/components/user-preview.vue | 4 +- .../views/components/users-list.item.vue | 4 +- .../pages/user/user.followers-you-know.vue | 2 +- .../desktop/views/pages/user/user.friends.vue | 4 +- .../desktop/views/pages/user/user.header.vue | 6 +-- src/web/app/desktop/views/pages/welcome.vue | 2 +- .../views/widgets/channel.channel.post.vue | 2 +- src/web/app/desktop/views/widgets/polls.vue | 4 +- src/web/app/desktop/views/widgets/profile.vue | 2 +- src/web/app/desktop/views/widgets/trends.vue | 4 +- src/web/app/desktop/views/widgets/users.vue | 4 +- src/web/app/mobile/script.ts | 8 ++-- .../mobile/views/components/notification.vue | 22 +++++----- .../app/mobile/views/components/post-card.vue | 2 +- .../views/components/post-detail.sub.vue | 6 +-- .../mobile/views/components/post-detail.vue | 10 ++--- .../mobile/views/components/post-preview.vue | 6 +-- .../app/mobile/views/components/post.sub.vue | 6 +-- src/web/app/mobile/views/components/post.vue | 10 ++--- .../app/mobile/views/components/ui.nav.vue | 2 +- .../app/mobile/views/components/user-card.vue | 4 +- .../mobile/views/components/user-preview.vue | 4 +- src/web/app/mobile/views/pages/user.vue | 4 +- .../pages/user/home.followers-you-know.vue | 2 +- .../mobile/views/pages/user/home.photos.vue | 2 +- src/web/app/mobile/views/pages/welcome.vue | 2 +- src/web/app/mobile/views/widgets/profile.vue | 2 +- 45 files changed, 127 insertions(+), 127 deletions(-) diff --git a/src/api/bot/interfaces/line.ts b/src/api/bot/interfaces/line.ts index bf0882159..6b2ebdec8 100644 --- a/src/api/bot/interfaces/line.ts +++ b/src/api/bot/interfaces/line.ts @@ -121,7 +121,7 @@ class LineBot extends BotCore { actions.push({ type: 'uri', label: 'Webで見る', - uri: `${config.url}/${user.username}` + uri: `${config.url}/@${user.username}` }); this.reply([{ diff --git a/src/api/models/user.ts b/src/api/models/user.ts index 08d7fbb8c..63f79908e 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -296,7 +296,7 @@ export const packForAp = ( if (!_user) return reject('invalid user arg.'); - const userUrl = `${config.url}/${_user.username}`; + const userUrl = `${config.url}/@${_user.username}`; resolve({ "@context": ["https://www.w3.org/ns/activitystreams", { diff --git a/src/common/othello/ai/back.ts b/src/common/othello/ai/back.ts index 42a256c0b..27dbc3952 100644 --- a/src/common/othello/ai/back.ts +++ b/src/common/othello/ai/back.ts @@ -47,8 +47,8 @@ process.on('message', async msg => { const user = game.user1_id == id ? game.user2 : game.user1; const isSettai = form[0].value === 0; const text = isSettai - ? `?[${user.name}](${conf.url}/${user.username})さんの接待を始めました!` - : `対局を?[${user.name}](${conf.url}/${user.username})さんと始めました! (強さ${form[0].value})`; + ? `?[${user.name}](${conf.url}/@${user.username})さんの接待を始めました!` + : `対局を?[${user.name}](${conf.url}/@${user.username})さんと始めました! (強さ${form[0].value})`; const res = await request.post(`${conf.api_url}/posts/create`, { json: { i, @@ -72,15 +72,15 @@ process.on('message', async msg => { const isSettai = form[0].value === 0; const text = isSettai ? msg.body.winner_id === null - ? `?[${user.name}](${conf.url}/${user.username})さんに接待で引き分けました...` + ? `?[${user.name}](${conf.url}/@${user.username})さんに接待で引き分けました...` : 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 - ? `?[${user.name}](${conf.url}/${user.username})さんと引き分けました~` + ? `?[${user.name}](${conf.url}/@${user.username})さんと引き分けました~` : 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`, { json: { i, diff --git a/src/web/app/ch/tags/channel.tag b/src/web/app/ch/tags/channel.tag index b5c6ce1e6..face824cf 100644 --- a/src/web/app/ch/tags/channel.tag +++ b/src/web/app/ch/tags/channel.tag @@ -165,7 +165,7 @@
{ post.index }: - { post.user.name } + { post.user.name } ID:{ post.user.username } diff --git a/src/web/app/ch/tags/header.tag b/src/web/app/ch/tags/header.tag index 747bec357..901123d63 100644 --- a/src/web/app/ch/tags/header.tag +++ b/src/web/app/ch/tags/header.tag @@ -4,7 +4,7 @@