make sounds great again

This commit is contained in:
syuilo 2018-03-04 18:50:30 +09:00
parent bad780ce96
commit 9cff3868de
6 changed files with 30 additions and 0 deletions

View file

@ -26,6 +26,13 @@
<mk-switch v-model="os.i.client_settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
</section>
<section class="web" v-show="page == 'web'">
<h1>サウンド</h1>
<mk-switch v-model="enableSounds" text="サウンドを有効にする">
<span>投稿やメッセージを送受信したときなどにサウンドを再生しますこの設定はブラウザに記憶されます</span>
</mk-switch>
</section>
<section class="web" v-show="page == 'web'">
<h1>モバイル</h1>
<mk-switch v-model="os.i.client_settings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/>
@ -166,6 +173,7 @@ export default Vue.extend({
version,
latestVersion: undefined,
checkingForUpdate: false,
enableSounds: localStorage.getItem('enableSounds') == 'true',
lang: localStorage.getItem('lang') || '',
preventUpdate: localStorage.getItem('preventUpdate') == 'true',
debug: localStorage.getItem('debug') == 'true',
@ -173,6 +181,9 @@ export default Vue.extend({
};
},
watch: {
enableSounds() {
localStorage.setItem('enableSounds', this.enableSounds ? 'true' : 'false');
},
lang() {
localStorage.setItem('lang', this.lang);
},