[Client] Follow api changes and some cleanups

This commit is contained in:
syuilo 2017-03-19 15:22:55 +09:00
parent 31550ce1d9
commit 898daf24d1
5 changed files with 12 additions and 36 deletions

View file

@ -54,12 +54,11 @@
e.preventDefault();
e.stopPropagation();
this.I.data.no_donation = true;
this.I.data.no_donation = 'true';
this.I.update();
this.api('i/appdata/set', {
data: JSON.stringify({
no_donation: this.I.data.no_donation
})
key: 'no_donation',
value: 'true'
});
this.unmount();

View file

@ -41,12 +41,6 @@
</section>
<section class="web" show={ page == 'web' }>
<h1>その他</h1>
<label class="checkbox">
<input type="checkbox" checked={ I.data.cache } onclick={ updateCache }/>
<p>読み込みを高速化する</p>
<p>API通信時に新鮮なユーザー情報をキャッシュすることでフェッチのオーバーヘッドを無くします。(実験的)</p>
</label>
</section>
<section class="apps" show={ page == 'apps' }>
@ -214,14 +208,5 @@
notify('プロフィールを更新しました');
});
};
this.updateCache = () => {
this.I.data.cache = !this.I.data.cache;
this.api('i/appdata/set', {
data: JSON.stringify({
cache: this.I.data.cache
})
});
};
</script>
</mk-settings>

View file

@ -1,5 +1,5 @@
<mk-ui-header>
<mk-donation if={ SIGNIN && !I.data.no_donation }></mk-donation>
<mk-donation if={ SIGNIN && I.data.no_donation != 'true' }></mk-donation>
<mk-special-message></mk-special-message>
<div class="main">
<div class="backdrop"></div>