This commit is contained in:
parent
db1c211322
commit
ab0b650696
4 changed files with 48 additions and 11 deletions
|
|
@ -18,6 +18,13 @@
|
|||
<x-profile/>
|
||||
</section>
|
||||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
<h1>動作</h1>
|
||||
<mk-switch v-model="fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み">
|
||||
<span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span>
|
||||
</mk-switch>
|
||||
</section>
|
||||
|
||||
<section class="web" v-show="page == 'web'">
|
||||
<h1>デザイン</h1>
|
||||
<div class="div">
|
||||
|
|
@ -186,6 +193,7 @@ export default Vue.extend({
|
|||
version,
|
||||
latestVersion: undefined,
|
||||
checkingForUpdate: false,
|
||||
fetchOnScroll: true,
|
||||
autoWatch: true,
|
||||
enableSounds: localStorage.getItem('enableSounds') == 'true',
|
||||
lang: localStorage.getItem('lang') || '',
|
||||
|
|
@ -223,6 +231,16 @@ export default Vue.extend({
|
|||
|
||||
if ((this as any).os.i.settings.auto_watch != null) {
|
||||
this.autoWatch = (this as any).os.i.settings.auto_watch;
|
||||
this.$watch('os.i.settings.auto_watch', v => {
|
||||
this.autoWatch = v;
|
||||
});
|
||||
}
|
||||
|
||||
if ((this as any).os.i.client_settings.fetchOnScroll != null) {
|
||||
this.fetchOnScroll = (this as any).os.i.client_settings.fetchOnScroll;
|
||||
this.$watch('os.i.client_settings.fetchOnScroll', v => {
|
||||
this.fetchOnScroll = v;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -230,6 +248,12 @@ export default Vue.extend({
|
|||
this.$router.push('/i/customize-home');
|
||||
this.$emit('done');
|
||||
},
|
||||
onChangeFetchOnScroll(v) {
|
||||
(this as any).api('i/update_client_setting', {
|
||||
name: 'fetchOnScroll',
|
||||
value: v
|
||||
});
|
||||
},
|
||||
onChangeAutoWatch(v) {
|
||||
(this as any).api('i/update', {
|
||||
auto_watch: v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue