Skip to content

Add classname to browser title #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"json-file-plus": "3.2.0",
"package-json": "5.0.0",
"passport": "0.4.0",
"passport-local": "1.0.0"
"passport-local": "1.0.0",
"react-helmet": "5.2.0"
},
"devDependencies": {
"@babel/core": "7.2.2",
Expand Down
8 changes: 6 additions & 2 deletions src/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
} from 'react-router';
import { Route, Redirect } from 'react-router-dom';
import createClass from 'create-react-class';
import { Helmet } from 'react-helmet';

const ShowSchemaOverview = false; //In progress features. Change false to true to work on this feature.

Expand Down Expand Up @@ -257,7 +258,7 @@ export default class Dashboard extends React.Component {
<Route path={ match.path + '/webhooks' } component={Webhooks} />

<Route path={ match.path + '/jobs' } component={JobsRoute}/>

<Route path={ match.path + '/logs/:type' } render={(props) => (
<Logs {...props} params={props.match.params} />
)} />
Expand All @@ -266,7 +267,7 @@ export default class Dashboard extends React.Component {
<Route path={ match.path + '/config' } component={Config} />
<Route path={ match.path + '/api_console' } component={ApiConsole} />
<Route path={ match.path + '/migration' } component={Migration} />/>


<Redirect exact from={ match.path + '/push' } to='/apps/:appId/push/new' />
<Redirect exact from={ match.path + '/push/activity' } to='/apps/:appId/push/activity/all' />
Expand Down Expand Up @@ -301,6 +302,9 @@ export default class Dashboard extends React.Component {
return (
<Router history={history}>
<div>
<Helmet>
<title>Parse Dashboard</title>
</Helmet>
<Switch>
<Route path='/apps' component={Index} />
<Route path='/account/overview' component={AccountSettingsPage} />
Expand Down
5 changes: 5 additions & 0 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import styles from 'dashboard/Data/Browser/Browser.s
import subscribeTo from 'lib/subscribeTo';
import * as ColumnPreferences from 'lib/ColumnPreferences';
import * as queryString from 'query-string';
import { Helmet } from 'react-helmet';

export default
@subscribeTo('Schema', 'schema')
Expand Down Expand Up @@ -1031,6 +1032,7 @@ class Browser extends DashboardView {
}

let notification = null;
const pageTitle = `${this.props.params.className} - Parse Dashboard`;

if (this.state.lastError) {
notification = (
Expand All @@ -1043,6 +1045,9 @@ class Browser extends DashboardView {
}
return (
<div>
<Helmet>
<title>{pageTitle}</title>
</Helmet>
{browser}
{notification}
{extras}
Expand Down