summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-21 20:34:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-21 20:34:54 +0900
commit2de118a45d0c9da11f652f9603650bd4008d8d4d (patch)
tree83b674d61fd0d6babb7d8c601fcf86bed59301f6 /src/web/app/common
parentwip (diff)
downloadmisskey-2de118a45d0c9da11f652f9603650bd4008d8d4d.tar.gz
misskey-2de118a45d0c9da11f652f9603650bd4008d8d4d.tar.bz2
misskey-2de118a45d0c9da11f652f9603650bd4008d8d4d.zip
wip
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/tags/signin-history.tag24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/web/app/common/tags/signin-history.tag b/src/web/app/common/tags/signin-history.tag
index 47bf68c283..3868980058 100644
--- a/src/web/app/common/tags/signin-history.tag
+++ b/src/web/app/common/tags/signin-history.tag
@@ -55,21 +55,23 @@
this.fetching = true;
this.on('mount', () => {
- this.api 'i/signin_history'
- }).then((history) => {
- this.history = history
- this.fetching = false
- this.update();
- .catch (err) =>
- console.error err
+ this.api('i/signin_history').then(history => {
+ this.update({
+ fetching: false,
+ history: history
+ });
+ });
- this.stream.on 'signin' this.on-signin
+ this.stream.on('signin', this.onSignin);
+ });
this.on('unmount', () => {
- this.stream.off 'signin' this.on-signin
+ this.stream.off('signin', this.onSignin);
+ });
- this.on-signin = (signin) => {
- @history.unshift signin
+ this.onSignin = signin => {
+ this.history.unshift(signin);
this.update();
+ };
</script>
</mk-signin-history>