This commit is contained in:
syuilo
2017-02-20 16:09:46 +09:00
parent 4c43573c1e
commit c05abf4da7
80 changed files with 400 additions and 366 deletions

View File

@ -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

View File

@ -56,7 +56,7 @@
this.on('mount', () => {
this.api 'i/signin_history'
.then (history) =>
}).then((history) => {
this.history = history
this.fetching = false
this.update();

View File

@ -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 =>

View File

@ -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 =>