mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Move title setting for index page to its own method so it can be used in reloads caused by route changes
This commit is contained in:
committed by
Franz Liedke
parent
94d8f7e726
commit
f1fc0fecb7
@@ -53,9 +53,9 @@ export default class IndexPage extends Page {
|
||||
app.discussions.refreshParams(app.search.params());
|
||||
|
||||
this.currentPath = curPath;
|
||||
}
|
||||
|
||||
console.log('IndexPage#onbeforeupdate');
|
||||
this.setTitle();
|
||||
}
|
||||
}
|
||||
|
||||
view() {
|
||||
@@ -80,11 +80,15 @@ export default class IndexPage extends Page {
|
||||
);
|
||||
}
|
||||
|
||||
setTitle() {
|
||||
app.setTitle(app.translator.trans('core.forum.index.meta_title_text'));
|
||||
app.setTitleCount(0);
|
||||
}
|
||||
|
||||
oncreate(vnode) {
|
||||
super.oncreate(vnode);
|
||||
|
||||
app.setTitle(app.translator.trans('core.forum.index.meta_title_text'));
|
||||
app.setTitleCount(0);
|
||||
this.setTitle();
|
||||
|
||||
// Work out the difference between the height of this hero and that of the
|
||||
// previous hero. Maintain the same scroll position relative to the bottom
|
||||
|
Reference in New Issue
Block a user