11import  { 
2-   Box , 
32  Flex , 
43  IconButton , 
54  Image , 
65  Popover , 
76  PopoverArrow , 
87  PopoverBody , 
8+   PopoverCloseButton , 
99  PopoverContent , 
1010  PopoverHeader , 
1111  PopoverTrigger , 
1212  Text , 
1313}  from  '@invoke-ai/ui-library' ; 
1414import  {  useAppDispatch ,  useAppSelector  }  from  'app/store/storeHooks' ; 
15- import  {  shouldShowNotificationIndicatorChanged  }  from  'features/ui/store/uiSlice' ; 
15+ import  {  shouldShowNotificationChanged  }  from  'features/ui/store/uiSlice' ; 
1616import  InvokeSymbol  from  'public/assets/images/invoke-favicon.png' ; 
1717import  {  useCallback  }  from  'react' ; 
1818import  {  useTranslation  }  from  'react-i18next' ; 
@@ -24,9 +24,9 @@ import { CanvasV2Announcement } from './CanvasV2Announcement';
2424export  const  Notifications  =  ( )  =>  { 
2525  const  {  t }  =  useTranslation ( ) ; 
2626  const  dispatch  =  useAppDispatch ( ) ; 
27-   const  shouldShowNotificationIndicator  =  useAppSelector ( ( s )  =>  s . ui . shouldShowNotificationIndicator ) ; 
27+   const  shouldShowNotification  =  useAppSelector ( ( s )  =>  s . ui . shouldShowNotification ) ; 
2828  const  resetIndicator  =  useCallback ( ( )  =>  { 
29-     dispatch ( shouldShowNotificationIndicatorChanged ( false ) ) ; 
29+     dispatch ( shouldShowNotificationChanged ( false ) ) ; 
3030  } ,  [ dispatch ] ) ; 
3131  const  {  data }  =  useGetAppVersionQuery ( ) ; 
3232
@@ -35,7 +35,7 @@ export const Notifications = () => {
3535  } 
3636
3737  return  ( 
38-     < Popover  onOpen = { resetIndicator }  placement = "top-start" > 
38+     < Popover  onClose = { resetIndicator }  placement = "top-start"   autoFocus = { false }   defaultIsOpen = { shouldShowNotification } > 
3939      < PopoverTrigger > 
4040        < Flex  pos = "relative" > 
4141          < IconButton 
@@ -44,22 +44,12 @@ export const Notifications = () => {
4444            icon = { < PiLightbulbFilamentBold  fontSize = { 20 }  /> } 
4545            boxSize = { 8 } 
4646          /> 
47-           { shouldShowNotificationIndicator  &&  ( 
48-             < Box 
49-               pos = "absolute" 
50-               top = { 0 } 
51-               right = "2px" 
52-               w = { 2 } 
53-               h = { 2 } 
54-               backgroundColor = "invokeYellow.500" 
55-               borderRadius = "100%" 
56-             /> 
57-           ) } 
5847        </ Flex > 
5948      </ PopoverTrigger > 
6049      < PopoverContent  p = { 2 } > 
6150        < PopoverArrow  /> 
62-         < PopoverHeader  fontSize = "md"  fontWeight = "semibold" > 
51+         < PopoverCloseButton  /> 
52+         < PopoverHeader  fontSize = "md"  fontWeight = "semibold"  pt = { 5 } > 
6353          < Flex  alignItems = "center"  gap = { 3 } > 
6454            < Image  src = { InvokeSymbol }  boxSize = { 6 }  /> 
6555            { t ( 'whatsNew.whatsNewInInvoke' ) } 
0 commit comments