From 8e248680e4f0d98b5ba61d8c986fc9ad9e98d46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 21 Jan 2019 17:36:24 +0900 Subject: [PATCH] WIP --- locales/ja-JP.yml | 4 + .../common/views/components/games/index.vue | 74 +++++++++++++++++++ src/client/app/desktop/script.ts | 2 + .../desktop/views/components/game-window.vue | 4 +- .../app/desktop/views/pages/games/index.vue | 20 +++++ src/client/app/mobile/script.ts | 2 + .../app/mobile/views/components/ui.nav.vue | 2 +- .../app/mobile/views/pages/games/index.vue | 16 ++++ 8 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 src/client/app/common/views/components/games/index.vue create mode 100644 src/client/app/desktop/views/pages/games/index.vue create mode 100644 src/client/app/mobile/views/pages/games/index.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 6b70ed08d..6e3a32e94 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -147,6 +147,10 @@ common: title: "問題が発生しました" retry: "やり直す" + games: + game: "ゲーム" + reversi: "リバーシ" + reversi: drawn: "引き分け" my-turn: "あなたのターンです" diff --git a/src/client/app/common/views/components/games/index.vue b/src/client/app/common/views/components/games/index.vue new file mode 100644 index 000000000..4be6b49e7 --- /dev/null +++ b/src/client/app/common/views/components/games/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 05cd79f70..a41bc0ccf 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -25,6 +25,7 @@ import MkMessagingRoom from './views/pages/messaging-room.vue'; import MkNote from './views/pages/note.vue'; import MkSearch from './views/pages/search.vue'; import MkTag from './views/pages/tag.vue'; +import MkGames from './views/pages/games/index.vue'; import MkReversi from './views/pages/games/reversi.vue'; import MkShare from './views/pages/share.vue'; import MkFollow from '../common/views/pages/follow.vue'; @@ -147,6 +148,7 @@ init(async (launch) => { { path: '/search', component: MkSearch }, { path: '/tags/:tag', name: 'tag', component: MkTag }, { path: '/share', component: MkShare }, + { path: '/games', component: MkGames }, { path: '/games/reversi/:game?', component: MkReversi }, { path: '/@:user', name: 'user', component: MkUser }, { path: '/@:user/following', name: 'userFollowing', component: MkUserFollowingOrFollowers }, diff --git a/src/client/app/desktop/views/components/game-window.vue b/src/client/app/desktop/views/components/game-window.vue index 9f8e0a2aa..b034ed37f 100644 --- a/src/client/app/desktop/views/components/game-window.vue +++ b/src/client/app/desktop/views/components/game-window.vue @@ -1,7 +1,7 @@ @@ -13,7 +13,7 @@ import { url } from '../../../config'; export default Vue.extend({ i18n: i18n('desktop/views/components/game-window.vue'), components: { - XReversi: () => import('../../../common/views/components/games/reversi/reversi.vue').then(m => m.default) + XGame: () => import('../../../common/views/components/games/index.vue').then(m => m.default) }, data() { return { diff --git a/src/client/app/desktop/views/pages/games/index.vue b/src/client/app/desktop/views/pages/games/index.vue new file mode 100644 index 000000000..cf1295d27 --- /dev/null +++ b/src/client/app/desktop/views/pages/games/index.vue @@ -0,0 +1,20 @@ + + + diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index bbbdc0ebb..0b7ce18bc 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -27,6 +27,7 @@ import MkFollowing from './views/pages/following.vue'; import MkFavorites from './views/pages/favorites.vue'; import MkUserLists from './views/pages/user-lists.vue'; import MkUserList from './views/pages/user-list.vue'; +import MkGames from './views/pages/games/index.vue'; import MkReversi from './views/pages/games/reversi.vue'; import MkTag from './views/pages/tag.vue'; import MkShare from './views/pages/share.vue'; @@ -135,6 +136,7 @@ init((launch) => { { path: '/search', component: MkSearch }, { path: '/tags/:tag', component: MkTag }, { path: '/share', component: MkShare }, + { path: '/games', component: MkGames }, { path: '/games/reversi/:game?', name: 'reversi', component: MkReversi }, { path: '/@:user', component: () => import('./views/pages/user.vue').then(m => m.default) }, { path: '/@:user/followers', component: MkFollowers }, diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index 7659d89b8..43a481c64 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -19,7 +19,7 @@
  • {{ $t('notifications') }}
  • {{ $t('@.messaging') }}
  • {{ $t('follow-requests') }}
  • -
  • {{ $t('game') }}
  • +
  • {{ $t('@.games.game') }}