diff --git a/package.json b/package.json index d5c756aa8a..f2cbdad6a1 100755 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.16.55", + "version": "0.16.56", "myplanet": { - "latest": "v0.21.96", - "min": "v0.20.96" + "latest": "v0.21.99", + "min": "v0.20.99" }, "scripts": { "ng": "ng", diff --git a/src/app/shared/dialogs/dialogs-add-resources.component.html b/src/app/shared/dialogs/dialogs-add-resources.component.html index b56c029b15..fa189446c6 100644 --- a/src/app/shared/dialogs/dialogs-add-resources.component.html +++ b/src/app/shared/dialogs/dialogs-add-resources.component.html @@ -10,5 +10,5 @@ OR - + diff --git a/src/app/shared/dialogs/dialogs-add-resources.component.ts b/src/app/shared/dialogs/dialogs-add-resources.component.ts index 2e5ae0fbb0..d17aa4c862 100644 --- a/src/app/shared/dialogs/dialogs-add-resources.component.ts +++ b/src/app/shared/dialogs/dialogs-add-resources.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject, ViewChild, AfterViewInit } from '@angular/core'; +import { Component, Inject, ViewChild, AfterViewInit, ChangeDetectorRef } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { ResourcesComponent } from '../../resources/resources.component'; import { ResourcesAddComponent } from '../../resources/resources-add.component'; @@ -16,11 +16,13 @@ export class DialogsAddResourcesComponent implements AfterViewInit { okDisabled = true; updateResource = false; existingResource: any = {}; + isSubmitting = false; constructor( public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any, - private dialogsLoadingService: DialogsLoadingService + private dialogsLoadingService: DialogsLoadingService, + private cdr: ChangeDetectorRef ) { this.linkInfo = this.data.db ? { [this.data.db]: this.data.linkId } : undefined; if (this.data.resource) { @@ -32,9 +34,14 @@ export class DialogsAddResourcesComponent implements AfterViewInit { ngAfterViewInit() { this.initOkDisableChange(); + this.cdr.detectChanges(); } ok() { + if (this.isSubmitting) { + return; + } + this.isSubmitting = true; this.dialogsLoadingService.start(); switch (this.view) { case 'resources':