wip
This commit is contained in:
@ -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
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
this.on('mount', () => {
|
||||
this.api 'i/signin_history'
|
||||
.then (history) =>
|
||||
}).then((history) => {
|
||||
this.history = history
|
||||
this.fetching = false
|
||||
this.update();
|
||||
|
@ -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 =>
|
||||
|
@ -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 =>
|
||||
|
Reference in New Issue
Block a user