mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 15:13:42 +08:00
Hide the drawer/modal when constructing all pages
Might be better to do this on config... also extract it into a parent "Page" component
This commit is contained in:
parent
b5ba21c9a6
commit
23895b2b36
|
@ -53,6 +53,8 @@ export default class DiscussionPage extends mixin(Component, evented) {
|
||||||
// button.
|
// button.
|
||||||
app.history.push('discussion');
|
app.history.push('discussion');
|
||||||
app.current = this;
|
app.current = this;
|
||||||
|
app.drawer.hide();
|
||||||
|
app.modal.close();
|
||||||
|
|
||||||
app.session.on('loggedIn', this.loggedInHandler = this.refresh.bind(this));
|
app.session.on('loggedIn', this.loggedInHandler = this.refresh.bind(this));
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,8 @@ export default class IndexPage extends Component {
|
||||||
|
|
||||||
app.history.push('index');
|
app.history.push('index');
|
||||||
app.current = this;
|
app.current = this;
|
||||||
|
app.drawer.hide();
|
||||||
|
app.modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
onunload() {
|
onunload() {
|
||||||
|
|
|
@ -12,6 +12,7 @@ export default class NotificationsPage extends Component {
|
||||||
app.current = this;
|
app.current = this;
|
||||||
app.history.push('notifications');
|
app.history.push('notifications');
|
||||||
app.drawer.hide();
|
app.drawer.hide();
|
||||||
|
app.modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
view() {
|
view() {
|
||||||
|
|
|
@ -19,7 +19,6 @@ export default class SettingsPage extends UserPage {
|
||||||
|
|
||||||
this.init(app.session.user);
|
this.init(app.session.user);
|
||||||
app.setTitle(app.trans('core.settings'));
|
app.setTitle(app.trans('core.settings'));
|
||||||
app.drawer.hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
content() {
|
content() {
|
||||||
|
|
|
@ -29,6 +29,7 @@ export default class UserPage extends Component {
|
||||||
app.history.push('user');
|
app.history.push('user');
|
||||||
app.current = this;
|
app.current = this;
|
||||||
app.drawer.hide();
|
app.drawer.hide();
|
||||||
|
app.modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
view() {
|
view() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user