1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 23:01:17 +02:00

Run prettier for all JS files

This commit is contained in:
Franz Liedke
2020-04-17 11:57:55 +02:00
parent 84cf938379
commit 89ef14faf1
145 changed files with 2374 additions and 2050 deletions

View File

@@ -39,16 +39,19 @@ export default class DiscussionComposer extends ComposerBody {
items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);
items.add('discussionTitle', (
items.add(
'discussionTitle',
<h3>
<input className="FormControl"
<input
className="FormControl"
value={this.title()}
oninput={m.withAttr('value', this.title)}
placeholder={this.props.titlePlaceholder}
disabled={!!this.props.disabled}
onkeydown={this.onkeydown.bind(this)}/>
onkeydown={this.onkeydown.bind(this)}
/>
</h3>
));
);
return items;
}
@@ -60,7 +63,8 @@ export default class DiscussionComposer extends ComposerBody {
* @param {Event} e
*/
onkeydown(e) {
if (e.which === 13) { // Return
if (e.which === 13) {
// Return
e.preventDefault();
this.editor.setSelectionRange(0, 0);
}
@@ -80,7 +84,7 @@ export default class DiscussionComposer extends ComposerBody {
data() {
return {
title: this.title(),
content: this.content()
content: this.content(),
};
}
@@ -89,13 +93,13 @@ export default class DiscussionComposer extends ComposerBody {
const data = this.data();
app.store.createRecord('discussions').save(data).then(
discussion => {
app.store
.createRecord('discussions')
.save(data)
.then((discussion) => {
app.composer.hide();
app.cache.discussionList.refresh();
m.route(app.route.discussion(discussion));
},
this.loaded.bind(this)
);
}, this.loaded.bind(this));
}
}