1
0
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:
Alexander Skvortsov
2020-06-27 14:18:49 -04:00
committed by GitHub
parent 0c645a6c15
commit a33fbbf814
5 changed files with 22 additions and 6 deletions

View File

@ -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;
}
/**