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:
Toby Zerner 2015-07-22 09:51:41 +09:30
parent b5ba21c9a6
commit 23895b2b36
5 changed files with 6 additions and 1 deletions

View File

@ -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));
}

View File

@ -48,6 +48,8 @@ export default class IndexPage extends Component {
app.history.push('index');
app.current = this;
app.drawer.hide();
app.modal.close();
}
onunload() {

View File

@ -12,6 +12,7 @@ export default class NotificationsPage extends Component {
app.current = this;
app.history.push('notifications');
app.drawer.hide();
app.modal.close();
}
view() {

View File

@ -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() {

View File

@ -29,6 +29,7 @@ export default class UserPage extends Component {
app.history.push('user');
app.current = this;
app.drawer.hide();
app.modal.close();
}
view() {