File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 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 {
414414 trackEvent ( 'ui' , 'paneHeaderDblClick' , codeWrapParent . dataset . type ) ;
415415 }
416416 async exportPngClickHandler ( e ) {
417+ if ( ! window . user ) {
418+ this . props . onLogin ( ) ;
419+ return ;
420+ }
417421 const png = await this . getPngBlob ( ) ;
418422 saveAs ( png , 'zenuml.png' ) ;
419423 trackEvent ( 'ui' , 'downloadPng' ) ;
@@ -429,6 +433,10 @@ export default class ContentWrap extends Component {
429433 }
430434
431435 async copyImageClickHandler ( e ) {
436+ if ( ! window . user ) {
437+ this . props . onLogin ( ) ;
438+ return ;
439+ }
432440 if ( ! navigator . clipboard || ! navigator . clipboard . write ) {
433441 this . showCopyErrorNotice ( ) ;
434442 trackEvent ( 'ui' , 'copyImageFailed1' ) ;
Original file line number Diff line number Diff line change @@ -1030,6 +1030,10 @@ BookLibService.Borrow(id) {
10301030 }
10311031 }
10321032 async openBtnClickHandler ( ) {
1033+ if ( ! window . user ) {
1034+ this . loginBtnClickHandler ( ) ;
1035+ return ;
1036+ }
10331037 trackEvent ( 'ui' , 'openBtnClick' ) ;
10341038 await this . openSavedItemsPane ( ) ;
10351039 }
You can’t perform that action at this time.
0 commit comments