File tree 3 files changed +43
-1
lines changed
3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import List from '@material-ui/core/List';
15
15
import ShowChartIcon from '@material-ui/icons/ShowChart' ;
16
16
import HomeIcon from '@material-ui/icons/Home' ;
17
17
import PublishIcon from '@material-ui/icons/Publish' ;
18
+ import CloseIcon from '@material-ui/icons/ExitToApp' ;
18
19
import SettingsIcon from '@material-ui/icons/Settings' ;
19
20
import { Online , Offline } from 'react-detect-offline' ;
20
21
import { withTranslation } from 'react-i18next' ;
@@ -200,6 +201,24 @@ export class MainMenu extends Component {
200
201
return null ;
201
202
} ;
202
203
204
+ renderCloseApp = ( ) => {
205
+ const { t } = this . props ;
206
+
207
+ return (
208
+ < MenuItem
209
+ onClick = { ( ) => {
210
+ window . close ( ) ;
211
+ } }
212
+ button
213
+ >
214
+ < ListItemIcon >
215
+ < CloseIcon />
216
+ </ ListItemIcon >
217
+ < ListItemText primary = { t ( 'Quit' ) } />
218
+ </ MenuItem >
219
+ ) ;
220
+ } ;
221
+
203
222
renderAuthenticatedMenu ( ) {
204
223
const {
205
224
authenticated,
@@ -311,6 +330,7 @@ export class MainMenu extends Component {
311
330
{ this . renderClassrooms ( ) }
312
331
{ this . renderDeveloperMode ( ) }
313
332
{ this . renderSignOut ( ) }
333
+ { this . renderCloseApp ( ) }
314
334
</ List >
315
335
) ;
316
336
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
17
17
} from '../../config/paths' ;
18
18
19
19
const MENUITEM_OFFLINE_NUMBER = 2 ;
20
- const MENUITEM_OFFLINE_ONLINE_COUNT = 10 ;
20
+ const MENUITEM_OFFLINE_ONLINE_COUNT = 11 ;
21
21
22
22
const createMainMenuProps = ( developerMode , path , authenticated = true ) => {
23
23
return {
Original file line number Diff line number Diff line change @@ -168,6 +168,17 @@ exports[`<MainMenu /> <MainMenu /> with developerMode = false renders correctly
168
168
primary="Sign Out"
169
169
/>
170
170
</WithStyles(ForwardRef(MenuItem))>
171
+ <WithStyles(ForwardRef(MenuItem))
172
+ button={ true }
173
+ onClick={ [Function ]}
174
+ >
175
+ <WithStyles(ForwardRef(ListItemIcon))>
176
+ <ExitToAppIcon />
177
+ </WithStyles(ForwardRef(ListItemIcon))>
178
+ <WithStyles(ForwardRef(ListItemText))
179
+ primary="Quit"
180
+ />
181
+ </WithStyles(ForwardRef(MenuItem))>
171
182
</WithStyles(ForwardRef(List))>
172
183
` ;
173
184
@@ -352,5 +363,16 @@ exports[`<MainMenu /> <MainMenu /> with developerMode = true renders correctly 1
352
363
primary="Sign Out"
353
364
/>
354
365
</WithStyles(ForwardRef(MenuItem))>
366
+ <WithStyles(ForwardRef(MenuItem))
367
+ button={ true }
368
+ onClick={ [Function ]}
369
+ >
370
+ <WithStyles(ForwardRef(ListItemIcon))>
371
+ <ExitToAppIcon />
372
+ </WithStyles(ForwardRef(ListItemIcon))>
373
+ <WithStyles(ForwardRef(ListItemText))
374
+ primary="Quit"
375
+ />
376
+ </WithStyles(ForwardRef(MenuItem))>
355
377
</WithStyles(ForwardRef(List))>
356
378
` ;
You can’t perform that action at this time.
0 commit comments