mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Use IS_DEV_OR_DEMO
for playground as suggested in https://github.com/inventree/InvenTree/pull/5359#issuecomment-1654593807 (#5454)
Fixes #5452
This commit is contained in:
parent
d25e9e2b2e
commit
c796e79cf0
@ -1,6 +1,7 @@
|
|||||||
import { Trans } from '@lingui/macro';
|
import { Trans } from '@lingui/macro';
|
||||||
|
|
||||||
import { DocumentationLinkItem } from '../components/items/DocumentationLinks';
|
import { DocumentationLinkItem } from '../components/items/DocumentationLinks';
|
||||||
|
import { IS_DEV_OR_DEMO } from '../main';
|
||||||
|
|
||||||
export const footerLinks = [
|
export const footerLinks = [
|
||||||
{
|
{
|
||||||
@ -22,11 +23,13 @@ export const footerLinks = [
|
|||||||
export const navTabs = [
|
export const navTabs = [
|
||||||
{ text: <Trans>Home</Trans>, name: 'home' },
|
{ text: <Trans>Home</Trans>, name: 'home' },
|
||||||
{ text: <Trans>Dashboard</Trans>, name: 'dashboard' },
|
{ text: <Trans>Dashboard</Trans>, name: 'dashboard' },
|
||||||
{ text: <Trans>Playground</Trans>, name: 'playground' },
|
|
||||||
{ text: <Trans>Parts</Trans>, name: 'parts' },
|
{ text: <Trans>Parts</Trans>, name: 'parts' },
|
||||||
{ text: <Trans>Stock</Trans>, name: 'stock' },
|
{ text: <Trans>Stock</Trans>, name: 'stock' },
|
||||||
{ text: <Trans>Build</Trans>, name: 'build' }
|
{ text: <Trans>Build</Trans>, name: 'build' }
|
||||||
];
|
];
|
||||||
|
if (IS_DEV_OR_DEMO) {
|
||||||
|
navTabs.push({ text: <Trans>Playground</Trans>, name: 'playground' });
|
||||||
|
}
|
||||||
|
|
||||||
export const docLinks = {
|
export const docLinks = {
|
||||||
app: 'https://docs.inventree.org/en/latest/app/app/',
|
app: 'https://docs.inventree.org/en/latest/app/app/',
|
||||||
|
@ -2,6 +2,7 @@ import { Trans, t } from '@lingui/macro';
|
|||||||
import { Image, Text } from '@mantine/core';
|
import { Image, Text } from '@mantine/core';
|
||||||
|
|
||||||
import { MenuLinkItem } from '../components/items/MenuLinks';
|
import { MenuLinkItem } from '../components/items/MenuLinks';
|
||||||
|
import { IS_DEV_OR_DEMO } from '../main';
|
||||||
|
|
||||||
export const menuItems: MenuLinkItem[] = [
|
export const menuItems: MenuLinkItem[] = [
|
||||||
{
|
{
|
||||||
@ -15,11 +16,14 @@ export const menuItems: MenuLinkItem[] = [
|
|||||||
text: <Trans>Profile page</Trans>,
|
text: <Trans>Profile page</Trans>,
|
||||||
link: '/profile/user',
|
link: '/profile/user',
|
||||||
doctext: <Trans>User attributes and design settings.</Trans>
|
doctext: <Trans>User attributes and design settings.</Trans>
|
||||||
},
|
}
|
||||||
{
|
];
|
||||||
|
|
||||||
|
if (IS_DEV_OR_DEMO) {
|
||||||
|
menuItems.push({
|
||||||
id: 'playground',
|
id: 'playground',
|
||||||
text: <Trans>Playground</Trans>,
|
text: <Trans>Playground</Trans>,
|
||||||
link: '/playground',
|
link: '/playground',
|
||||||
highlight: true
|
highlight: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
];
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user