Skip to content

Commit

Permalink
Convenience icon in VersionBar to launch admin console
Browse files Browse the repository at this point in the history
  • Loading branch information
amcclain committed Jul 5, 2023
1 parent 151b1d9 commit 236c493
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions desktop/appcontainer/VersionBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const versionBar = hoistCmp.factory({
env = XH.getEnv('appEnvironment'),
version = XH.getEnv('clientVersion'),
build = XH.getEnv('clientBuild'),
isAdminApp = window.location.pathname?.startsWith('/admin/'),
versionAndBuild =
!build || build === 'UNKNOWN' ? version : `${version} (build ${build})`;

Expand All @@ -36,6 +37,10 @@ export const versionBar = hoistCmp.factory({
Icon.search({
omit: !inspectorSvc.enabled,
onClick: () => inspectorSvc.toggleActive()
}),
Icon.wrench({
omit: isAdminApp || !XH.getUser().isHoistAdminReader,
onClick: () => window.open('/admin')
})
]
});
Expand Down

0 comments on commit 236c493

Please sign in to comment.