From f0b71cd605eb7cf01e070f60c5e012a26fb8709d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 19 Oct 2018 11:10:49 +0900 Subject: [PATCH] Resolve #2719 --- locales/ja-JP.yml | 1 + src/client/app/desktop/script.ts | 2 ++ .../app/desktop/views/components/settings.vue | 8 ++++++ .../views/components/ui.header.nav.vue | 28 +++++++++++-------- .../desktop/views/components/ui.sidebar.vue | 22 +++++++++++---- src/client/app/desktop/views/pages/index.vue | 11 +++++++- src/client/app/store.ts | 3 +- 7 files changed, 55 insertions(+), 20 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 623bbdd98..9d5b052ef 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -836,6 +836,7 @@ desktop/views/components/settings.vue: api-via-stream-desc: "この設定をオンにすると、websocket接続を経由してAPIリクエストが行われます(パフォーマンス向上が期待できます)。オフにすると、ネイティブの fetch APIが利用されます。この設定はこのデバイスのみ有効です。" deck-nav: "デッキ内ナビゲーション" deck-nav-desc: "デッキを使用しているとき、ナビゲーションが発生する際にページ遷移を行わずに一時的なカラムで受けるようにします。" + deck-default: "デッキをデフォルトのUIにする" display: "デザインと表示" customize: "ホームをカスタマイズ" diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 3c9003cbe..6b81a5aa7 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -21,6 +21,7 @@ import updateAvatar from './api/update-avatar'; import updateBanner from './api/update-banner'; import MkIndex from './views/pages/index.vue'; +import MkHome from './views/pages/home.vue'; import MkDeck from './views/pages/deck/deck.vue'; import MkAdmin from './views/pages/admin/admin.vue'; import MkStats from './views/pages/stats/stats.vue'; @@ -54,6 +55,7 @@ init(async (launch) => { mode: 'history', routes: [ { path: '/', name: 'index', component: MkIndex }, + { path: '/home', name: 'home', component: MkHome }, { path: '/deck', name: 'deck', component: MkDeck }, { path: '/admin', name: 'admin', component: MkAdmin }, { path: '/stats', name: 'stats', component: MkStats }, diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index cd91c1461..3e64ebf59 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -97,6 +97,9 @@ %i18n:@navbar-position-left% %i18n:@navbar-position-right% +
+ %i18n:@deck-default% +
%i18n:@dark-mode% %i18n:@use-shadow% @@ -366,6 +369,11 @@ export default Vue.extend({ set(value) { this.$store.commit('device/set', { key: 'deckColumnAlign', value }); } }, + deckDefault: { + get() { return this.$store.state.device.deckDefault; }, + set(value) { this.$store.commit('device/set', { key: 'deckDefault', value }); } + }, + enableSounds: { get() { return this.$store.state.device.enableSounds; }, set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); } 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 122570a69..3acc25c0d 100644 --- a/src/client/app/desktop/views/components/ui.header.nav.vue +++ b/src/client/app/desktop/views/components/ui.header.nav.vue @@ -2,18 +2,22 @@