feat: display version number #386
This commit is contained in:
parent
e596e6d365
commit
14ad04a8b2
@ -1,6 +1,7 @@
|
|||||||
import { getUmiConfig, resolveNocobasePackagesAlias } from '@nocobase/devtools/umiConfig';
|
import { getUmiConfig, resolveNocobasePackagesAlias } from '@nocobase/devtools/umiConfig';
|
||||||
import { defineConfig } from 'umi';
|
import { defineConfig } from 'umi';
|
||||||
|
|
||||||
|
const packageJson = require('./package.json');
|
||||||
const umiConfig = getUmiConfig();
|
const umiConfig = getUmiConfig();
|
||||||
|
|
||||||
process.env.MFSU_AD = 'none';
|
process.env.MFSU_AD = 'none';
|
||||||
@ -9,6 +10,7 @@ export default defineConfig({
|
|||||||
hash: true,
|
hash: true,
|
||||||
define: {
|
define: {
|
||||||
'process.env.APP_ENV': process.env.APP_ENV,
|
'process.env.APP_ENV': process.env.APP_ENV,
|
||||||
|
'process.env.VERSION': packageJson?.devDependencies?.['@nocobase/client'],
|
||||||
...umiConfig.define,
|
...umiConfig.define,
|
||||||
},
|
},
|
||||||
// only proxy when using `umi dev`
|
// only proxy when using `umi dev`
|
||||||
|
@ -26,6 +26,8 @@ export const CurrentUser = () => {
|
|||||||
}}
|
}}
|
||||||
overlay={
|
overlay={
|
||||||
<Menu>
|
<Menu>
|
||||||
|
<Menu.Item disabled>Version {process.env.VERSION}</Menu.Item>
|
||||||
|
<Menu.Divider />
|
||||||
<EditProfile />
|
<EditProfile />
|
||||||
<ChangePassword />
|
<ChangePassword />
|
||||||
<SwitchRole />
|
<SwitchRole />
|
||||||
|
Loading…
Reference in New Issue
Block a user