mirror of
https://github.com/flarum/core.git
synced 2025-08-16 13:24:11 +02:00
Don't accept unnecessary vnode arguments in view
This commit is contained in:
committed by
Franz Liedke
parent
e699ada1cc
commit
88bc291c86
@@ -27,7 +27,7 @@ export default class Modal extends Component {
|
|||||||
this.attrs.onshow(() => this.onready());
|
this.attrs.onshow(() => this.onready());
|
||||||
}
|
}
|
||||||
|
|
||||||
view(vnode) {
|
view() {
|
||||||
if (this.alertAttrs) {
|
if (this.alertAttrs) {
|
||||||
this.alertAttrs.dismissible = false;
|
this.alertAttrs.dismissible = false;
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,7 @@ import Component from '../Component';
|
|||||||
* overwrite the previous one.
|
* overwrite the previous one.
|
||||||
*/
|
*/
|
||||||
export default class ModalManager extends Component {
|
export default class ModalManager extends Component {
|
||||||
view(vnode) {
|
view() {
|
||||||
const modal = this.attrs.state.modal;
|
const modal = this.attrs.state.modal;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -9,7 +9,7 @@ import Component from '../Component';
|
|||||||
* - `text`
|
* - `text`
|
||||||
*/
|
*/
|
||||||
export default class Placeholder extends Component {
|
export default class Placeholder extends Component {
|
||||||
view(vnode) {
|
view() {
|
||||||
return (
|
return (
|
||||||
<div className="Placeholder">
|
<div className="Placeholder">
|
||||||
<p>{this.attrs.text}</p>
|
<p>{this.attrs.text}</p>
|
||||||
|
@@ -12,7 +12,7 @@ import Placeholder from '../../common/components/Placeholder';
|
|||||||
* - `state` A DiscussionListState object that represents the discussion lists's state.
|
* - `state` A DiscussionListState object that represents the discussion lists's state.
|
||||||
*/
|
*/
|
||||||
export default class DiscussionList extends Component {
|
export default class DiscussionList extends Component {
|
||||||
view(vnode) {
|
view() {
|
||||||
const state = this.attrs.state;
|
const state = this.attrs.state;
|
||||||
|
|
||||||
const params = state.getParams();
|
const params = state.getParams();
|
||||||
|
@@ -54,7 +54,7 @@ export default class DiscussionListItem extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
view(vnode) {
|
view() {
|
||||||
const discussion = this.attrs.discussion;
|
const discussion = this.attrs.discussion;
|
||||||
const user = discussion.user();
|
const user = discussion.user();
|
||||||
const isUnread = discussion.isUnread();
|
const isUnread = discussion.isUnread();
|
||||||
|
@@ -22,7 +22,7 @@ export default class PostStreamScrubber extends Component {
|
|||||||
this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));
|
this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));
|
||||||
}
|
}
|
||||||
|
|
||||||
view(vnode) {
|
view() {
|
||||||
const count = this.stream.count();
|
const count = this.stream.count();
|
||||||
|
|
||||||
// Index is left blank for performance reasons, it is filled in in updateScubberValues
|
// Index is left blank for performance reasons, it is filled in in updateScubberValues
|
||||||
|
@@ -23,7 +23,7 @@ export default function alertEmailConfirmation(app) {
|
|||||||
this.content = app.translator.trans('core.forum.user_email_confirmation.resend_button');
|
this.content = app.translator.trans('core.forum.user_email_confirmation.resend_button');
|
||||||
}
|
}
|
||||||
|
|
||||||
view(vnode) {
|
view() {
|
||||||
return (
|
return (
|
||||||
<Button class="Button Button--link" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.disabled}>
|
<Button class="Button Button--link" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.disabled}>
|
||||||
{this.content}
|
{this.content}
|
||||||
|
Reference in New Issue
Block a user