mirror of
https://github.com/flarum/core.git
synced 2025-07-13 04:46:24 +02:00
Add index page title, add mechanism to clear title from defaultRoute. (#2047)
* Add "All Descriptions title to index * Added system to clear custom title if we're on the default route
This commit is contained in:
committed by
GitHub
parent
0c645a6c15
commit
a33fbbf814
@ -237,7 +237,10 @@ export default class Application {
|
||||
}
|
||||
|
||||
updateTitle() {
|
||||
document.title = (this.titleCount ? `(${this.titleCount}) ` : '') + (this.title ? this.title + ' - ' : '') + this.forum.attribute('title');
|
||||
const count = this.titleCount ? `(${this.titleCount}) ` : '';
|
||||
const pageTitleWithSeparator = this.title && m.route() !== '/' ? this.title + ' - ' : '';
|
||||
const title = this.forum.attribute('title');
|
||||
document.title = count + pageTitleWithSeparator + title;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user