summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-20 16:09:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-20 16:09:46 +0900
commitc05abf4da75fce296e5d744ae99e004fe1294642 (patch)
tree4176368740c3465718e3fc87ffbea1a8386ebfe3 /src/web/app/common
parentwip (diff)
downloadsharkey-c05abf4da75fce296e5d744ae99e004fe1294642.tar.gz
sharkey-c05abf4da75fce296e5d744ae99e004fe1294642.tar.bz2
sharkey-c05abf4da75fce296e5d744ae99e004fe1294642.zip
wip
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/tags/messaging/index.tag4
-rw-r--r--src/web/app/common/tags/signin-history.tag2
-rw-r--r--src/web/app/common/tags/signin.tag6
-rw-r--r--src/web/app/common/tags/signup.tag12
4 files changed, 12 insertions, 12 deletions
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 =>