Skip to content

Commit

Permalink
version number in menu using tauri js api
Browse files Browse the repository at this point in the history
  • Loading branch information
rgodha24 committed Jan 10, 2024
1 parent 4a23379 commit 0e4b74a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { toast } from "react-toastify";
import { dialog, invoke, path } from "@tauri-apps/api";

import SettingsModal from "./components/config/SettingsModal";
import { version } from "./util/version";

type Props = {};

Expand Down Expand Up @@ -118,7 +119,7 @@ class AppMenu extends Component<Props, State> {
<MenuIcon></MenuIcon>
</IconButton>
</Tooltip>
Choreo
Choreo v{version}
</div>
<List style={{ paddingBottom: "50px", paddingTop: "0px" }}>
{/* Document Settings (open the robot config, etc modal) */}
Expand Down
5 changes: 5 additions & 0 deletions src/util/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getVersion } from "@tauri-apps/api/app";

export let version: string = "unknown";

getVersion().then((v) => (version = v));

0 comments on commit 0e4b74a

Please sign in to comment.