11import {
22 Avatar ,
3- Button ,
4- ButtonDomRef ,
5- Icon ,
63 List ,
74 ListItemStandard ,
85 Popover ,
@@ -18,30 +15,19 @@ import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js'
1815import { useTranslation } from 'react-i18next' ;
1916import { generateInitialsForEmail } from '../Helper/generateInitialsForEmail.ts' ;
2017import styles from './ShellBar.module.css' ;
21- import { ThemingParameters } from '@ui5/webcomponents-react-base' ;
2218
2319
2420export function ShellBarComponent ( ) {
2521 const auth = useAuthOnboarding ( ) ;
2622 const profilePopoverRef = useRef < PopoverDomRef > ( null ) ;
27- const betaPopoverRef = useRef < PopoverDomRef > ( null ) ;
2823 const [ profilePopoverOpen , setProfilePopoverOpen ] = useState ( false ) ;
29- const [ betaPopoverOpen , setBetaPopoverOpen ] = useState ( false ) ;
30- const betaButtonRef = useRef < ButtonDomRef > ( null ) ;
3124
32- const { t } = useTranslation ( ) ;
3325
3426 const onProfileClick = ( e : Ui5CustomEvent < ShellBarDomRef , ShellBarProfileClickEventDetail > ) => {
3527 profilePopoverRef . current ! . opener = e . detail . targetRef ;
3628 setProfilePopoverOpen ( ! profilePopoverOpen ) ;
3729 } ;
3830
39- const onBetaClick = ( ) => {
40- if ( betaButtonRef . current ) {
41- betaPopoverRef . current ! . opener = betaButtonRef . current ;
42- setBetaPopoverOpen ( ! betaPopoverOpen ) ;
43- }
44- } ;
4531
4632 useEffect ( ( ) => {
4733 const shellbar = document . querySelector ( 'ui5-shellbar' ) ;
@@ -64,20 +50,13 @@ export function ShellBarComponent() {
6450 < img src = "/logo.png" alt = "MCP" className = { styles . logo } />
6551 < span className = { styles . logoText } > MCP</ span >
6652 </ div >
67- < Button ref = { betaButtonRef } className = { styles . betaButton } onClick = { onBetaClick } >
68- < span className = { styles . betaContent } >
69- < Icon name = "information" className = { styles . betaIcon } />
70- < span className = { styles . betaText } > { t ( 'ShellBar.betaButton' ) } </ span >
71- </ span >
72- </ Button >
7353 </ div >
7454 }
7555 onProfileClick = { onProfileClick }
7656 >
7757 </ ShellBar >
7858
7959 < ProfilePopover open = { profilePopoverOpen } setOpen = { setProfilePopoverOpen } popoverRef = { profilePopoverRef } />
80- < BetaPopover open = { betaPopoverOpen } setOpen = { setBetaPopoverOpen } popoverRef = { betaPopoverRef } />
8160
8261 </ >
8362 ) ;
@@ -118,29 +97,3 @@ const ProfilePopover = ({
11897 ) ;
11998} ;
12099
121- const BetaPopover = ( {
122- open,
123- setOpen,
124- popoverRef,
125- } : {
126- open : boolean ;
127- setOpen : ( arg0 : boolean ) => void ;
128- popoverRef : RefObject < PopoverDomRef | null > ;
129- } ) => {
130- const { t } = useTranslation ( ) ;
131-
132- return (
133- < Popover ref = { popoverRef } placement = { PopoverPlacement . Bottom } open = { open } onClose = { ( ) => setOpen ( false ) } >
134- < div
135- style = { {
136- padding : '1rem' ,
137- maxWidth : '250px' ,
138- fontFamily : ThemingParameters . sapFontFamily ,
139- } }
140- >
141- { t ( 'ShellBar.betaButtonDescription' ) }
142- </ div >
143- </ Popover >
144- ) ;
145- } ;
146-
0 commit comments