Skip to content

Commit

Permalink
display current version in the dashboard (ToolJet#3244)
Browse files Browse the repository at this point in the history
* display current version in the dashboard

* reverting the changes

* display version name in the dashboard using public config file
  • Loading branch information
manishkushare authored Jun 15, 2022
1 parent b7eb656 commit 6f6d59f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class App extends React.Component {
if (this.state.currentUser) {
tooljetService.fetchMetaData().then((data) => {
this.setState({ onboarded: data.onboarded });

config.currentVersion = data.installed_version;
if (data.latest_version && lt(data.installed_version, data.latest_version) && data.version_ignored === false) {
this.setState({ updateAvailable: true });
}
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/_components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import { authenticationService, userService } from '@/_services';
import { history } from '@/_helpers';
import { DarkModeToggle } from './DarkModeToggle';

import config from 'config';
import LogoIcon from '../Editor/Icons/logo.svg';
import { Organization } from './Organization';

Expand Down Expand Up @@ -95,6 +95,9 @@ export const Header = function Header({ switchDarkMode, darkMode }) {
<Link data-testid="logoutBtn" to="#" onClick={logout} className="dropdown-item" data-cy="logout-link">
Logout
</Link>
<Link to="#" className="dropdown-item pe-none text-secondary">
v{config.currentVersion}
</Link>
</div>
</div>
</div>
Expand Down

0 comments on commit 6f6d59f

Please sign in to comment.