From c05abf4da75fce296e5d744ae99e004fe1294642 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 20 Feb 2017 16:09:46 +0900 Subject: wip --- src/web/app/common/tags/messaging/index.tag | 4 ++-- src/web/app/common/tags/signin-history.tag | 2 +- src/web/app/common/tags/signin.tag | 6 +++--- src/web/app/common/tags/signup.tag | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/web/app/common') diff --git a/src/web/app/common/tags/messaging/index.tag b/src/web/app/common/tags/messaging/index.tag index ca1adaaa70..6ba6cb7d94 100644 --- a/src/web/app/common/tags/messaging/index.tag +++ b/src/web/app/common/tags/messaging/index.tag @@ -310,10 +310,10 @@ if (q == '') { this.searchResult = []; } else { - this.api 'users/search' do + this.api('users/search', { query: q max: 5 - .then (users) => + }).then((users) => { users.forEach (user) => user._click = => this.trigger 'navigate-user' user diff --git a/src/web/app/common/tags/signin-history.tag b/src/web/app/common/tags/signin-history.tag index 6b2ca1e6c9..47bf68c283 100644 --- a/src/web/app/common/tags/signin-history.tag +++ b/src/web/app/common/tags/signin-history.tag @@ -56,7 +56,7 @@ this.on('mount', () => { this.api 'i/signin_history' - .then (history) => + }).then((history) => { this.history = history this.fetching = false this.update(); diff --git a/src/web/app/common/tags/signin.tag b/src/web/app/common/tags/signin.tag index 204ed83269..7b297b7b8e 100644 --- a/src/web/app/common/tags/signin.tag +++ b/src/web/app/common/tags/signin.tag @@ -103,9 +103,9 @@ this.signing = false; this.oninput = () => { - this.api 'users/show' do + this.api('users/show', { username: this.refs.username.value - .then (user) => + }).then((user) => { this.user = user this.trigger 'user' user this.update(); @@ -123,7 +123,7 @@ this.signing = true this.update(); - this.api 'signin' do + this.api('signin', { username: this.refs.username.value password: this.refs.password.value .then => diff --git a/src/web/app/common/tags/signup.tag b/src/web/app/common/tags/signup.tag index 06e044a411..7646f8c861 100644 --- a/src/web/app/common/tags/signup.tag +++ b/src/web/app/common/tags/signup.tag @@ -220,9 +220,9 @@ this.username-state = 'wait' this.update(); - this.api 'username/available' do + this.api('username/available', { username: username - .then (result) => + }).then((result) => { if result.available this.username-state = 'ok' else @@ -271,14 +271,14 @@ const username = this.refs.username.value; const password = this.refs.password.value; - locker = document.body.appendChild document.createElement 'mk-locker' - - this.api 'signup' do + locker = document.body.appendChild(document.createElement('mk-locker')); + + this.api('signup', { username: username, password: password, 'g-recaptcha-response': grecaptcha.getResponse() .then => - this.api 'signin' do + this.api('signin', { username: username password: password .then => -- cgit v1.2.3-freya