Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
TdDialogService.prototype._createConfig = function (config) {
var dialogConfig = new MatDialogConfig();
dialogConfig.width = '400px';
Object.assign(dialogConfig, config);
return dialogConfig;
};
TdDialogService = tslib_1.__decorate([
public static openDialog(dialog: MatDialog, nodes: NodeData[]): MatDialogRef {
const config = new MatDialogConfig();
config.data = nodes;
config.autoFocus = false;
config.width = AppConfig.smallModalWidth;
return dialog.open(UpdateComponent, config);
}
public static openDialog(dialog: MatDialog, currentLocalPk: string): MatDialogRef {
const config = new MatDialogConfig();
config.data = currentLocalPk;
config.autoFocus = false;
config.width = AppConfig.mediumModalWidth;
return dialog.open(AddVpnServerComponent, config);
}
onEditWallet() {
const dialogConfig = new MatDialogConfig();
dialogConfig.width = '566px';
dialogConfig.data = this.wallet;
dialogConfig.autoFocus = false;
this.dialog.open(ChangeNameComponent, dialogConfig);
}
openUploadDialog() {
const config = new MatDialogConfig();
config.width = '80%';
config.height = '60%';
config.data = {
title: 'Upload Software Packages',
headerMessage: 'Upload software packages into this software repository. The selected archive may contain any new software package or a new version of an existing software package.',
url: this.softwareService.getSoftwareUploadUrl(this.softwareRepositoryName),
mimeTypes: ['application/x-zip-compressed', 'application/zip'],
mimeTypeErrorMessage: 'Only ZIP files can be uploaded.'
};
this.dialog
.open(FileUploadComponent, config)
.afterClosed()
.subscribe(e => {
this.loadSoftwares();
});
}
public static openDialog(dialog: MatDialog, routeID: string): MatDialogRef {
const config = new MatDialogConfig();
config.data = routeID;
config.autoFocus = false;
config.width = AppConfig.largeModalWidth;
return dialog.open(RouteDetailsComponent, config);
}
private createConfig(config: DialogConfig): MatDialogConfig {
const dialogConfig: MatDialogConfig = new MatDialogConfig();
dialogConfig.width = '400px';
Object.assign(dialogConfig, config);
return dialogConfig;
}
public static openDialog(dialog: MatDialog, app: Application): MatDialogRef {
const config = new MatDialogConfig();
config.data = app;
config.autoFocus = false;
config.width = AppConfig.mediumModalWidth;
return dialog.open(SkysocksSettingsComponent, config);
}
public static openDialog(dialog: MatDialog, allowEmpty: boolean): MatDialogRef {
const config = new MatDialogConfig();
config.data = allowEmpty;
config.autoFocus = false;
config.width = AppConfig.mediumModalWidth;
return dialog.open(EnterVpnServerPasswordComponent, config);
}
public static openDialog(dialog: MatDialog, data: BasicTerminalData): MatDialogRef {
const config = new MatDialogConfig();
config.data = data;
config.autoFocus = false;
config.width = AppConfig.largeModalWidth;
return dialog.open(BasicTerminalComponent, config);
}