Skip to content

Commit 08afac5

Browse files
authored
Merge pull request #1505 from jumpserver/dev
v4.10.16-lts
2 parents 05384e8 + 64e9732 commit 08afac5

1 file changed

Lines changed: 7 additions & 26 deletions

File tree

src/app/elements/content/content.component.ts

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)