From a340d4ed8ed61b98c607501916b646096e85a0f3 Mon Sep 17 00:00:00 2001 From: Xeltica <7106976+Xeltica@users.noreply.github.com> Date: Wed, 19 Feb 2020 03:11:09 +0900 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E6=8A=95=E7=A8=BF=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=82=92=E5=AE=9F=E8=A3=85=20(#5994?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 固定投稿フォームを実装 * fix --- locales/ja-JP.yml | 1 + src/client/components/post-form.vue | 14 ++++++++++++-- src/client/pages/index.home.vue | 9 +++++++++ src/client/pages/settings/index.vue | 6 ++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 7e50a0222..38b2a344e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -421,6 +421,7 @@ objectStorage: "オブジェクトストレージ" useObjectStorage: "オブジェクトストレージを使用" serverLogs: "サーバーログ" deleteAll: "全て削除" +showFixedPostForm: "タイムライン上部に投稿画面を表示する" _ago: unknown: "謎" diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 2e6285cb0..e80da4995 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -6,7 +6,7 @@ @drop.stop="onDrop" >
- +
{{ max - trimmedLength(text) }}
-
+
{{ $t('quoteAttached') }}
@@ -108,6 +108,11 @@ export default Vue.extend({ type: Boolean, required: false, default: false + }, + fixed: { + type: Boolean, + required: false, + default: false } }, @@ -651,6 +656,11 @@ export default Vue.extend({ max-width: 500px; margin: 0 auto; + &.fixed { + max-width: unset; + margin: 0 32px; + } + > .preview { padding: 16px; } diff --git a/src/client/pages/index.home.vue b/src/client/pages/index.home.vue index f42dfe3da..bc7b5f443 100644 --- a/src/client/pages/index.home.vue +++ b/src/client/pages/index.home.vue @@ -16,6 +16,9 @@ +
+ +
@@ -27,6 +30,7 @@ import { faComments } from '@fortawesome/free-regular-svg-icons'; import Progress from '../scripts/loading'; import XTimeline from '../components/timeline.vue'; import XTutorial from './index.home.tutorial.vue'; +import XPostForm from '../components/post-form.vue'; export default Vue.extend({ metaInfo() { @@ -38,6 +42,7 @@ export default Vue.extend({ components: { XTimeline, XTutorial, + XPostForm, }, props: { @@ -174,6 +179,10 @@ export default Vue.extend({ } } +.post-form { + margin-bottom: var(--margin); +} + ._kjvfvyph_ { position: relative; height: 100%; diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index 16efe79d0..986ade8ff 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -20,6 +20,7 @@ {{ $t('useOsNativeEmojis') }} + {{ $t('showFixedPostForm') }}
@@ -105,6 +106,11 @@ export default Vue.extend({ get() { return this.$store.state.device.imageNewTab; }, set(value) { this.$store.commit('device/set', { key: 'imageNewTab', value }); } }, + + showFixedPostForm: { + get() { return this.$store.state.device.showFixedPostForm; }, + set(value) { this.$store.commit('device/set', { key: 'showFixedPostForm', value }); } + }, }, watch: {