1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

F #5422: Add beta text to header (#1484)

This commit is contained in:
Sergio Betanzos 2021-09-27 17:14:59 +02:00 committed by GitHub
parent 735a8d4feb
commit 12b783fd2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 17 deletions

View File

@ -14,6 +14,7 @@
* limitations under the License. *
* ------------------------------------------------------------------------- */
import { useEffect, useMemo, JSXElementConstructor } from 'react'
import { Chip } from '@material-ui/core'
import Router from 'client/router'
import { ENDPOINTS, PATH, getEndpointsByView } from 'client/apps/sunstone/routes'
@ -45,7 +46,12 @@ const SunstoneApp = () => {
(async () => {
try {
if (jwt) {
changeAppTitle(APP_NAME)
changeAppTitle(
<>
{APP_NAME}
<Chip size='small' label='BETA' color='primary' />
</>
)
getAuthUser()
await getSunstoneViews()
await getSunstoneConfig()

View File

@ -16,15 +16,7 @@
/* eslint-disable jsdoc/require-jsdoc */
import PropTypes from 'prop-types'
import {
AppBar,
Box,
Toolbar,
Typography,
IconButton,
useMediaQuery
// useScrollTrigger
} from '@material-ui/core'
import { AppBar, Box, Toolbar, Typography, IconButton, useMediaQuery } from '@material-ui/core'
import { Menu as MenuIcon } from 'iconoir-react'
import { useAuth } from 'client/features/Auth'
@ -36,7 +28,7 @@ import Group from 'client/components/Header/Group'
import Zone from 'client/components/Header/Zone'
import headerStyles from 'client/components/Header/styles'
const Header = ({ scrollContainer }) => {
const Header = () => {
const { isOneAdmin } = useAuth()
const { appTitle, title } = useGeneral()
const { fixMenu } = useGeneralApi()
@ -44,12 +36,6 @@ const Header = ({ scrollContainer }) => {
const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg'))
const isMobile = useMediaQuery(theme => theme.breakpoints.only('xs'))
/* const isScroll = scrollContainer && useScrollTrigger({
disableHysteresis: true,
threshold: 100,
target: scrollContainer
}) */
const classes = headerStyles({ isScroll: false })
const handleFixMenu = () => {