@@ -119,18 +119,8 @@ export class ElementContentComponent implements OnInit, OnDestroy {
119119 this . toggleMenu . emit ( ) ;
120120
121121 setTimeout ( async ( ) => {
122- // 如果已经打开了 15 个,那么弹出一个确认框,点击确认重新再一个新的浏览器 tab 下打开 luna 应用
123- if ( this . viewList . length >= 15 ) {
124- const msg = await this . _i18nSvc . t ( 'tabLimits' ) ;
125- const ok = window . confirm ( msg ) ;
126-
127- if ( ok ) {
128- window . open ( window . location . href , '_blank' ) ;
129- }
130- } else {
131- this . _viewSvc . addView ( view ) ;
132- this . setViewActive ( view ) ;
133- }
122+ this . _viewSvc . addView ( view ) ;
123+ this . setViewActive ( view ) ;
134124 } , 100 ) ;
135125 }
136126
@@ -226,20 +216,11 @@ export class ElementContentComponent implements OnInit, OnDestroy {
226216 const oldView = this . viewList . find ( i => i . id === oldId ) ;
227217 const oldConnectToken = oldView . connectToken ;
228218
229- if ( this . viewList . length >= 15 ) {
230- const msg = await this . _i18nSvc . t ( 'tabLimits' ) ;
231- const ok = window . confirm ( msg ) ;
232-
233- if ( ok ) {
234- window . open ( window . location . href , '_blank' ) ;
235- }
236- } else {
237- this . _connectTokenSvc . exchange ( oldConnectToken ) . then ( newConnectToken => {
238- const newView = new View ( oldView . asset , oldView . connectData , newConnectToken ) ;
239- this . _viewSvc . addView ( newView ) ;
240- this . setViewActive ( newView ) ;
241- } ) ;
242- }
219+ this . _connectTokenSvc . exchange ( oldConnectToken ) . then ( newConnectToken => {
220+ const newView = new View ( oldView . asset , oldView . connectData , newConnectToken ) ;
221+ this . _viewSvc . addView ( newView ) ;
222+ this . setViewActive ( newView ) ;
223+ } ) ;
243224 }
244225 } ,
245226 {
0 commit comments