From 31b30e3dd29c8cebc387222265951fa2be15f885 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 6 Dec 2018 11:11:46 +0900 Subject: [PATCH] Resolve #3347 , #3349 (#3513) * Resolve #3347 , #3349 Make deck columns' width be selectable and flexible * deckColumnMinwidth --> deckColumnMinWidth * w-default --> normal * :v: --- locales/ja-JP.yml | 9 ++++- .../app/desktop/views/components/settings.vue | 14 ++++++++ .../desktop/views/pages/deck/deck.column.vue | 3 +- .../app/desktop/views/pages/deck/deck.vue | 35 ++++++++++++++++++- src/client/app/store.ts | 1 + 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5c78681b1..54dad96f8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -863,9 +863,16 @@ desktop/views/components/settings.vue: show-local-renotes: "ローカルの投稿のRenoteをタイムラインに表示する" show-maps: "マップの自動展開" remain-deleted-note: "削除された投稿を表示し続ける" - deck-column-align: "デッキのカラムの位置" + deck-column-align: "デッキのカラムの配置" deck-column-align-center: "中央" deck-column-align-left: "左" + deck-column-align-flexible: "フレキシブル" + deck-column-width: "デッキのカラムの幅" + deck-column-width-narrow: "狭" + deck-column-width-narrower: "やや狭" + deck-column-width-normal: "普通" + deck-column-width-wider: "やや広" + deck-column-width-wide: "広" sound: "サウンド" enable-sounds: "サウンドを有効にする" diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index a6a938960..d2ba2c8e7 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -124,6 +124,15 @@
{{ $t('deck-column-align') }}
{{ $t('deck-column-align-center') }} {{ $t('deck-column-align-left') }} + {{ $t('deck-column-align-flexible') }} + +
+
{{ $t('deck-column-width') }}
+ {{ $t('deck-column-width-narrow') }} + {{ $t('deck-column-width-narrower') }} + {{ $t('deck-column-width-normal') }} + {{ $t('deck-column-width-wider') }} + {{ $t('deck-column-width-wide') }}
{{ $t('@.show-reversi-board-labels') }} @@ -357,6 +366,11 @@ export default Vue.extend({ set(value) { this.$store.commit('device/set', { key: 'deckColumnAlign', value }); } }, + deckColumnWidth: { + get() { return this.$store.state.device.deckColumnWidth; }, + set(value) { this.$store.commit('device/set', { key: 'deckColumnWidth', value }); } + }, + deckDefault: { get() { return this.$store.state.device.deckDefault; }, set(value) { this.$store.commit('device/set', { key: 'deckDefault', value }); } diff --git a/src/client/app/desktop/views/pages/deck/deck.column.vue b/src/client/app/desktop/views/pages/deck/deck.column.vue index bb3f0d8c1..13f7638a0 100644 --- a/src/client/app/desktop/views/pages/deck/deck.column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.column.vue @@ -318,8 +318,6 @@ export default Vue.extend({ .dnpfarvgbnfmyzbdquhhzyxcmstpdqzs $header-height = 42px - width 330px - min-width 330px height 100% background var(--face) border-radius var(--round) @@ -354,6 +352,7 @@ export default Vue.extend({ &:not(.isStacked).narrow width 285px min-width 285px + flex-grow 0 !important &.naked background var(--deckAcrylicColumnBg) diff --git a/src/client/app/desktop/views/pages/deck/deck.vue b/src/client/app/desktop/views/pages/deck/deck.vue index 885f72a04..56c6dd051 100644 --- a/src/client/app/desktop/views/pages/deck/deck.vue +++ b/src/client/app/desktop/views/pages/deck/deck.vue @@ -1,6 +1,6 @@