diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index 3d610ab777..475e08f168 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -105,6 +105,10 @@ class Editor extends React.Component { }; } + setWindowTitle(name) { + document.title = name ? `${name} - Tooljet` : `Untitled App - Tooljet`; + } + componentDidMount() { this.fetchApps(0); this.fetchApp(); @@ -166,6 +170,7 @@ class Editor extends React.Component { if (this.state.socket) { this.state.socket?.close(); } + document.title = 'Tooljet - Dashboard'; } getWebsocketUrl = () => { @@ -324,6 +329,7 @@ class Editor extends React.Component { console.log('Default component state computed and set'); this.runQueries(data.data_queries); }); + this.setWindowTitle(data.name); } ); @@ -660,6 +666,7 @@ class Editor extends React.Component { this.setState({ app: { ...this.state.app, name: newName }, }); + this.setWindowTitle(newName); }; toggleQueryEditor = () => {