Skip to content

Commit

Permalink
TLピン留ボタンをオプションに
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Aug 4, 2021
1 parent c1d7fd9 commit 4c818c5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ common:
disable-animated-mfm: "Disable animated texts in a post"
disable-showing-animated-images: "Do not play animated images"
showInstanceInfo: "Show instance information"
showTlPin: "Show TL pin buttons"
enableKeyboardShortcutInNote: "Enable keyboard shortcut in post"
suggest-recent-hashtags: "Show recent popular hashtags on the post form"
always-show-nsfw: "Always show NSFW contents"
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ common:
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
disable-showing-animated-images: "アニメーション画像を再生しない"
showInstanceInfo: "インスタンス情報を表示する"
showTlPin: "タイムラインにピン留めボタンを表示する"
enableKeyboardShortcutInNote: "投稿でのキーボードショートカットを有効にする"
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
always-show-nsfw: "常に閲覧注意のメディアを表示する"
Expand Down
6 changes: 6 additions & 0 deletions src/client/app/common/views/components/settings/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<ui-switch v-model="disableAnimatedMfm">{{ $t('@._settings.disable-animated-mfm') }}</ui-switch>
<ui-switch v-model="disableShowingAnimatedImages">{{ $t('@._settings.disable-showing-animated-images') }}</ui-switch>
<ui-switch v-model="showInstanceInfo">{{ $t('@._settings.showInstanceInfo') }}</ui-switch>
<ui-switch v-model="showTlPin">{{ $t('@._settings.showTlPin') }}</ui-switch>
</section>
<section v-if="$root.isMobile">
<header>{{ $t('@._settings.post-style') }}</header>
Expand Down Expand Up @@ -654,6 +655,11 @@ export default Vue.extend({
set(value) { this.$store.commit('device/set', { key: 'showInstanceInfo', value }); }
},
showTlPin: {
get() { return !!this.$store.state.device.showTlPin; },
set(value) { this.$store.commit('device/set', { key: 'showTlPin', value }); }
},
enableKeyboardShortcutInNote: {
get() { return !!this.$store.state.device.enableKeyboardShortcutInNote; },
set(value) { this.$store.commit('device/set', { key: 'enableKeyboardShortcutInNote', value }); }
Expand Down
2 changes: 1 addition & 1 deletion src/client/app/desktop/views/components/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<button @click="menu()" ref="menuButton" class="button">
<fa icon="ellipsis-h"/>
</button>
<button class="button stayTl" :class="{ pinned: !!appearNote.stayTl }" @click="toggleStayTl"><fa icon="thumbtack"/></button>
<button v-if="$store.state.device.showTlPin" class="button stayTl" :class="{ pinned: !!appearNote.stayTl }" @click="toggleStayTl"><fa icon="thumbtack"/></button>
</footer>
<div class="deleted" v-if="appearNote.deletedAt != null">{{ $t('deleted') }}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/client/app/mobile/views/components/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<button class="button" @click="menu()" ref="menuButton">
<fa icon="ellipsis-h"/>
</button>
<button class="button stayTl" :class="{ pinned: !!appearNote.stayTl }" @click="toggleStayTl"><fa icon="thumbtack"/></button>
<button v-if="$store.state.device.showTlPin" class="button stayTl" :class="{ pinned: !!appearNote.stayTl }" @click="toggleStayTl"><fa icon="thumbtack"/></button>
</footer>
<div class="deleted" v-if="appearNote.deletedAt != null">{{ $t('deleted') }}</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/client/app/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const defaultDeviceSettings = Object.assign({
mobileNotificationPosition: 'bottom',
disableShowingAnimatedImages: true,
showInstanceInfo: false,
showTlPin: false,
enableKeyboardShortcutInNote: false,
expandUsersPhotos: true,
expandUsersActivity: true,
Expand Down

0 comments on commit 4c818c5

Please sign in to comment.