File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -414,6 +414,10 @@ export default class ContentWrap extends Component {
414
414
trackEvent ( 'ui' , 'paneHeaderDblClick' , codeWrapParent . dataset . type ) ;
415
415
}
416
416
async exportPngClickHandler ( e ) {
417
+ if ( ! window . user ) {
418
+ this . props . onLogin ( ) ;
419
+ return ;
420
+ }
417
421
const png = await this . getPngBlob ( ) ;
418
422
saveAs ( png , 'zenuml.png' ) ;
419
423
trackEvent ( 'ui' , 'downloadPng' ) ;
@@ -429,6 +433,10 @@ export default class ContentWrap extends Component {
429
433
}
430
434
431
435
async copyImageClickHandler ( e ) {
436
+ if ( ! window . user ) {
437
+ this . props . onLogin ( ) ;
438
+ return ;
439
+ }
432
440
if ( ! navigator . clipboard || ! navigator . clipboard . write ) {
433
441
this . showCopyErrorNotice ( ) ;
434
442
trackEvent ( 'ui' , 'copyImageFailed1' ) ;
Original file line number Diff line number Diff line change @@ -1030,6 +1030,10 @@ BookLibService.Borrow(id) {
1030
1030
}
1031
1031
}
1032
1032
async openBtnClickHandler ( ) {
1033
+ if ( ! window . user ) {
1034
+ this . loginBtnClickHandler ( ) ;
1035
+ return ;
1036
+ }
1033
1037
trackEvent ( 'ui' , 'openBtnClick' ) ;
1034
1038
await this . openSavedItemsPane ( ) ;
1035
1039
}
You can’t perform that action at this time.
0 commit comments