@@ -10,6 +10,7 @@ import AccountWindow from "./windows/AccountWindow";
1010import { useErrorContext } from "./contexts/ErrorContext" ;
1111import { useDeviceContext } from "./contexts/DeviceContext" ;
1212import MobileHeader from "./MobileHeader" ;
13+ import AboutWindow from "./windows/AboutWindow" ;
1314
1415function Main ( ) {
1516 const { isMobile } = useDeviceContext ( ) ;
@@ -60,12 +61,31 @@ function Main() {
6061 setIsSettingsVisible ( false ) ;
6162 }
6263
64+ /*
65+ About window
66+ */
67+ const [ isAboutWindowVisible , setIsAboutWindowVisible ] = useState ( false ) ;
68+
69+ const onAboutClick = ( ) => {
70+ if ( ! isAboutWindowVisible ) {
71+ closeAllWindows ( ) ;
72+ setIsAboutWindowVisible ( true ) ;
73+ } else {
74+ setIsAboutWindowVisible ( false ) ;
75+ }
76+ }
77+
78+ const onAboutCrossClick = ( ) => {
79+ setIsAboutWindowVisible ( false ) ;
80+ }
81+
6382 /*
6483 Close all windows
6584 */
6685 const closeAllWindows = ( ) => {
67- setIsSettingsVisible ( false ) ;
6886 setIsAccountWindowVisible ( false ) ;
87+ setIsSettingsVisible ( false ) ;
88+ setIsAboutWindowVisible ( false ) ;
6989 }
7090
7191 /*
@@ -123,11 +143,13 @@ function Main() {
123143 ? < MobileHeader
124144 onAccountClick = { onAccountClick }
125145 onSettingsClick = { onSettingsClick }
146+ onAboutClick = { onAboutClick }
126147 onFullscreenClick = { toggleFullscreen }
127148 />
128149 : < Header
129150 onAccountClick = { onAccountClick }
130151 onSettingsClick = { onSettingsClick }
152+ onAboutClick = { onAboutClick }
131153 onFullscreenClick = { toggleFullscreen }
132154 />
133155 ) }
@@ -165,6 +187,12 @@ function Main() {
165187 />
166188 }
167189
190+ { isAboutWindowVisible &&
191+ < AboutWindow
192+ onAboutCrossClick = { onAboutCrossClick }
193+ />
194+ }
195+
168196 { isErrorWindowActive &&
169197 < ServerErrorWindow />
170198 }
0 commit comments