diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index fda917e36..13f881d23 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -27,8 +27,10 @@ export class AppComponent { @HostListener('document:keypress', ['$event']) handleKeyboardEvent (event: KeyboardEvent) { if (event.key === 'Enter') { + const elems = document.getElementsByClassName('enter-click') const elem = elems[elems.length - 1] as HTMLButtonElement + if (elem.classList.contains('no-click')) return if (elem) elem.click() } } @@ -99,7 +101,7 @@ export class AppComponent { this.patch.watch$() .pipe( - filter(data => !isEmptyObject(data)), + filter(data => !isEmptyObject(data as object)), take(1), ) .subscribe(_ => { diff --git a/ui/src/app/modals/app-config/app-config.page.html b/ui/src/app/modals/app-config/app-config.page.html index 3910133aa..8dd8a7e0f 100644 --- a/ui/src/app/modals/app-config/app-config.page.html +++ b/ui/src/app/modals/app-config/app-config.page.html @@ -81,7 +81,7 @@ - + Save diff --git a/ui/src/app/modals/app-config/app-config.page.ts b/ui/src/app/modals/app-config/app-config.page.ts index 4872cc676..5e332c4a5 100644 --- a/ui/src/app/modals/app-config/app-config.page.ts +++ b/ui/src/app/modals/app-config/app-config.page.ts @@ -23,6 +23,7 @@ export class AppConfigPage { configForm: FormGroup current: object hasConfig = false + saving = false rec: Recommendation | null = null showRec = true @@ -128,6 +129,7 @@ export class AppConfigPage { const config = this.configForm.value try { + this.saving = true const breakages = await this.embassyApi.drySetPackageConfig({ id: pkg.manifest.id, config, @@ -152,6 +154,7 @@ export class AppConfigPage { } catch (e) { this.errToast.present(e) } finally { + this.saving = false loader.dismiss() } }