mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 01:25:55 +03:00
spa: set page title per app correctly
This commit is contained in:
parent
a4dd04daf0
commit
90e2a94b58
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user