Merge pull request #1439 from processing/title-indexing
Fixes #1425 - Removes sketch title from <title> for unsaved, new sketch
This commit is contained in:
commit
b0ee542b71
1 changed files with 6 additions and 1 deletions
|
@ -123,6 +123,11 @@ class IDEView extends React.Component {
|
||||||
this.autosaveInterval = null;
|
this.autosaveInterval = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTitle = () => {
|
||||||
|
const { id } = this.props.project;
|
||||||
|
return id ? `p5.js Web Editor | ${this.props.project.name}` : 'p5.js Web Editor';
|
||||||
|
}
|
||||||
|
|
||||||
isUserOwner() {
|
isUserOwner() {
|
||||||
return this.props.project.owner && this.props.project.owner.id === this.props.user.id;
|
return this.props.project.owner && this.props.project.owner.id === this.props.user.id;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +208,7 @@ class IDEView extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div className="ide">
|
<div className="ide">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>p5.js Web Editor | {this.props.project.name}</title>
|
<title>{this.getTitle()}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
{this.props.toast.isVisible && <Toast />}
|
{this.props.toast.isVisible && <Toast />}
|
||||||
<Nav
|
<Nav
|
||||||
|
|
Loading…
Reference in a new issue