spa: set page title per app correctly

This commit is contained in:
Matilde Park 2020-06-05 17:30:14 -04:00
parent a4dd04daf0
commit 90e2a94b58
6 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ export default class ChatApp extends React.Component {
}
componentDidMount() {
window.title = 'OS1 - Chat';
document.title = 'OS1 - Chat';
// preload spinner asset
new Image().src = '/~landscape/img/Spinner.png';
@ -74,7 +74,7 @@ export default class ChatApp extends React.Component {
});
if (totalUnreads !== this.totalUnreads) {
document.title = totalUnreads > 0 ? `Chat - (${totalUnreads})` : 'Chat';
document.title = totalUnreads > 0 ? `OS1 - Chat (${totalUnreads})` : 'OS1 - Chat';
this.totalUnreads = totalUnreads;
}

View File

@ -28,7 +28,7 @@ export default class DojoApp extends Component {
}
componentDidMount() {
window.title = 'OS1 - Dojo';
document.title = 'OS1 - Dojo';
const channel = new this.props.channel();
this.api = new Api(this.props.ship, channel);

View File

@ -23,7 +23,7 @@ export default class GroupsApp extends Component {
}
componentDidMount() {
window.title = 'OS1 - Groups';
document.title = 'OS1 - Groups';
// preload spinner asset
new Image().src = '/~landscape/img/Spinner.png';

View File

@ -23,7 +23,7 @@ export default class LaunchApp extends React.Component {
}
componentDidMount() {
window.title = 'OS1 - Home';
document.title = 'OS1 - Home';
// preload spinner asset
new Image().src = '/~landscape/img/Spinner.png';

View File

@ -29,7 +29,7 @@ export class LinksApp extends Component {
}
componentDidMount() {
window.title = 'OS1 - Groups';
document.title = 'OS1 - Links';
// preload spinner asset
new Image().src = '/~landscape/img/Spinner.png';
@ -73,7 +73,7 @@ export class LinksApp extends Component {
);
if(totalUnseen !== this.totalUnseen) {
document.title = totalUnseen !== 0 ? `Links - (${totalUnseen})` : 'Links';
document.title = totalUnseen !== 0 ? `OS1 - Links (${totalUnseen})` : 'OS1 - Links';
this.totalUnseen = totalUnseen;
}

View File

@ -31,7 +31,7 @@ export default class PublishApp extends React.Component {
}
componentDidMount() {
window.title = 'OS1 - Groups';
document.title = 'OS1 - Publish';
// preload spinner asset
new Image().src = '/~landscape/img/Spinner.png';
@ -70,7 +70,7 @@ export default class PublishApp extends React.Component {
.value();
if (this.unreadTotal !== unreadTotal) {
window.title = unreadTotal > 0 ? `Publish - (${unreadTotal})` : 'Publish';
document.title = unreadTotal > 0 ? `OS1 - Publish (${unreadTotal})` : 'OS1 - Publish';
this.unreadTotal = unreadTotal;
}