mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +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.
|
||||
app.history.push('discussion');
|
||||
app.current = this;
|
||||
app.drawer.hide();
|
||||
app.modal.close();
|
||||
|
||||
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.current = this;
|
||||
app.drawer.hide();
|
||||
app.modal.close();
|
||||
}
|
||||
|
||||
onunload() {
|
||||
|
|
|
@ -12,6 +12,7 @@ export default class NotificationsPage extends Component {
|
|||
app.current = this;
|
||||
app.history.push('notifications');
|
||||
app.drawer.hide();
|
||||
app.modal.close();
|
||||
}
|
||||
|
||||
view() {
|
||||
|
|
|
@ -19,7 +19,6 @@ export default class SettingsPage extends UserPage {
|
|||
|
||||
this.init(app.session.user);
|
||||
app.setTitle(app.trans('core.settings'));
|
||||
app.drawer.hide();
|
||||
}
|
||||
|
||||
content() {
|
||||
|
|
|
@ -29,6 +29,7 @@ export default class UserPage extends Component {
|
|||
app.history.push('user');
|
||||
app.current = this;
|
||||
app.drawer.hide();
|
||||
app.modal.close();
|
||||
}
|
||||
|
||||
view() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user