diff --git a/locales/ja.yml b/locales/ja.yml index 0bb268d7a4..888fb08c96 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -707,6 +707,7 @@ desktop/views/components/settings.vue: circle-icons: "円形のアイコンを使用" gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用" post-form-on-timeline: "タイムライン上部に投稿フォームを表示する" + suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する" show-reply-target: "リプライ先を表示する" show-my-renotes: "自分の行ったRenoteをタイムラインに表示する" show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する" diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index f504ce3deb..ea51144173 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -10,7 +10,7 @@ <span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span> <a @click="addVisibleUser">%i18n:@add-visible-user%</a> </div> - <div class="hashtags" v-if="recentHashtags.length > 0"> + <div class="hashtags" v-if="recentHashtags.length > 0 && $store.state.settings.suggestRecentHashtags"> <b>%i18n:@recent-tags%:</b> <a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)" title="%@click-to-tagging%">#{{ tag }}</a> </div> diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index fa21410d39..e249afed85 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -48,6 +48,7 @@ <mk-switch v-model="$store.state.settings.iLikeSushi" @change="onChangeILikeSushi" text="%i18n:common.i-like-sushi%"/> </div> <mk-switch v-model="$store.state.settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="%i18n:@post-form-on-timeline%"/> + <mk-switch v-model="$store.state.settings.suggestRecentHashtags" @change="onChangeSuggestRecentHashtags" text="%i18n:@suggest-recent-hashtags%"/> <mk-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget" text="%i18n:@show-reply-target%"/> <mk-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes" text="%i18n:@show-my-renotes%"/> <mk-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="%i18n:@show-renoted-my-notes%"/> @@ -336,6 +337,12 @@ export default Vue.extend({ value: v }); }, + onChangeSuggestRecentHashtags(v) { + this.$store.dispatch('settings/set', { + key: 'suggestRecentHashtags', + value: v + }); + }, onChangeShowReplyTarget(v) { this.$store.dispatch('settings/set', { key: 'showReplyTarget', diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 625fa45ac1..702bc4c9e1 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -45,7 +45,7 @@ <input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/> </div> </div> - <div class="hashtags" v-if="recentHashtags.length > 0"> + <div class="hashtags" v-if="recentHashtags.length > 0 && $store.state.settings.suggestRecentHashtags"> <a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)">#{{ tag }}</a> </div> </div> diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 487b12df8b..f85253a281 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -11,6 +11,7 @@ const defaultSettings = { fetchOnScroll: true, showMaps: true, showPostFormOnTopOfTl: false, + suggestRecentHashtags: true, circleIcons: true, gradientWindowHeader: false, showReplyTarget: true,