From 95b157ac3e40408ab0298f3e247ef36feb6123be Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 15 Feb 2019 06:31:03 +0900 Subject: [PATCH] Add featured page --- locales/ja-JP.yml | 1 + src/client/app/desktop/script.ts | 2 + .../views/components/ui.header.nav.vue | 21 ++++--- .../views/deck/deck.featured-column.vue | 59 +++++++++++++++++++ .../app/desktop/views/home/featured.vue | 54 +++++++++++++++++ src/client/app/mobile/script.ts | 2 +- .../app/mobile/views/components/ui.nav.vue | 3 + .../app/mobile/views/pages/featured.vue | 49 +++++++++++++++ 8 files changed, 182 insertions(+), 9 deletions(-) create mode 100644 src/client/app/desktop/views/deck/deck.featured-column.vue create mode 100644 src/client/app/desktop/views/home/featured.vue create mode 100644 src/client/app/mobile/views/pages/featured.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d025f300a6..659ece2d14 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -29,6 +29,7 @@ common: enter-password: "パスワードを入力してください" 2fa: "二段階認証" customize-home: "ホームをカスタマイズ" + featured-notes: "ハイライト" got-it: "わかった" customization-tips: diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 26fe273394..2454520618 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -134,6 +134,7 @@ init(async (launch, os) => { { path: '/@:user', name: 'user', component: () => import('./views/deck/deck.user-column.vue').then(m => m.default) }, { path: '/notes/:note', name: 'note', component: () => import('./views/deck/deck.note-column.vue').then(m => m.default) }, { path: '/tags/:tag', name: 'tag', component: () => import('./views/deck/deck.hashtag-column.vue').then(m => m.default) }, + { path: '/featured', component: () => import('./views/deck/deck.featured-column.vue').then(m => m.default) }, { path: '/i/favorites', component: () => import('./views/deck/deck.favorites-column.vue').then(m => m.default) } ]} : { path: '/', component: MkHome, children: [ @@ -141,6 +142,7 @@ init(async (launch, os) => { { path: '/@:user', name: 'user', component: () => import('./views/home/user/user.vue').then(m => m.default) }, { path: '/notes/:note', name: 'note', component: () => import('./views/home/note.vue').then(m => m.default) }, { path: '/tags/:tag', name: 'tag', component: () => import('./views/home/tag.vue').then(m => m.default) }, + { path: '/featured', component: () => import('./views/home/featured.vue').then(m => m.default) }, { path: '/i/favorites', component: () => import('./views/home/favorites.vue').then(m => m.default) } ]}, { path: '/i/messaging/:user', component: MkMessagingRoom }, diff --git a/src/client/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue index 44659eb0d8..23fa67d1f1 100644 --- a/src/client/app/desktop/views/components/ui.header.nav.vue +++ b/src/client/app/desktop/views/components/ui.header.nav.vue @@ -25,14 +25,17 @@ -
  • - - -

    {{ $t('game') }}

    - -
    -
  • + +
  • + + +

    {{ $t('game') }}

    + +
    +
  • @@ -42,13 +45,15 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import MkMessagingWindow from './messaging-window.vue'; import MkGameWindow from './game-window.vue'; +import { faNewspaper } from '@fortawesome/free-solid-svg-icons'; export default Vue.extend({ i18n: i18n('desktop/views/components/ui.header.nav.vue'), data() { return { hasGameInvitations: false, - connection: null + connection: null, + faNewspaper }; }, computed: { diff --git a/src/client/app/desktop/views/deck/deck.featured-column.vue b/src/client/app/desktop/views/deck/deck.featured-column.vue new file mode 100644 index 0000000000..bd2e99ba48 --- /dev/null +++ b/src/client/app/desktop/views/deck/deck.featured-column.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/client/app/desktop/views/home/featured.vue b/src/client/app/desktop/views/home/featured.vue new file mode 100644 index 0000000000..efebfe4821 --- /dev/null +++ b/src/client/app/desktop/views/home/featured.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index bbbdc0ebb0..f912c0d53b 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -12,7 +12,6 @@ import init from '../init'; import MkIndex from './views/pages/index.vue'; import MkSignup from './views/pages/signup.vue'; -import MkUser from './views/pages/user.vue'; import MkSelectDrive from './views/pages/selectdrive.vue'; import MkDrive from './views/pages/drive.vue'; import MkNotifications from './views/pages/notifications.vue'; @@ -134,6 +133,7 @@ init((launch) => { { path: '/selectdrive', component: MkSelectDrive }, { path: '/search', component: MkSearch }, { path: '/tags/:tag', component: MkTag }, + { path: '/featured', name: 'featured', component: () => import('./views/pages/featured.vue').then(m => m.default) }, { path: '/share', component: MkShare }, { path: '/games/reversi/:game?', name: 'reversi', component: MkReversi }, { path: '/@:user', component: () => import('./views/pages/user.vue').then(m => m.default) }, diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index c59d624f77..af2e3e4c6f 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -19,6 +19,7 @@
  • {{ $t('notifications') }}
  • {{ $t('@.messaging') }}
  • {{ $t('follow-requests') }}
  • +
  • {{ $t('@.featured-notes') }}
  • {{ $t('game') }}