From 6a676afd83f4f90199cf3d8e9f6542e2426ebfbc Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Wed, 28 Jun 2023 15:39:53 +0200 Subject: [PATCH 1/2] Bug: remove new lines from multitext (#1766) * Prevent newlines in multi-text values * Log recording sample rate --- .../shared/audio-recorder/audio-recorder.component.ts | 8 ++++++-- .../lexicon/editor/field/dc-text.component.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/angular-app/bellows/shared/audio-recorder/audio-recorder.component.ts b/src/angular-app/bellows/shared/audio-recorder/audio-recorder.component.ts index 19ca23020b..46dc4679a3 100644 --- a/src/angular-app/bellows/shared/audio-recorder/audio-recorder.component.ts +++ b/src/angular-app/bellows/shared/audio-recorder/audio-recorder.component.ts @@ -88,8 +88,12 @@ export class AudioRecorderController implements angular.IController { //Stopping the media stream tracks releases the red recording indicator from browser tabs this.mediaRecorder.addEventListener("stop", () => { - stream.getTracks().forEach(function(track) { - track.stop(); + stream.getTracks().forEach(function (track) { + try { + console.log('Sample rate', track.getSettings().sampleRate); + } finally { + track.stop(); + } }); } ); diff --git a/src/angular-app/languageforge/lexicon/editor/field/dc-text.component.ts b/src/angular-app/languageforge/lexicon/editor/field/dc-text.component.ts index 8136a7f276..6e700a6cdc 100644 --- a/src/angular-app/languageforge/lexicon/editor/field/dc-text.component.ts +++ b/src/angular-app/languageforge/lexicon/editor/field/dc-text.component.ts @@ -29,7 +29,7 @@ export class FieldTextController implements angular.IController { fteMultiline: boolean; fteDir: string; fteFieldName: string; - + fte: any = {}; textFieldValue: string = ''; autocapitalize: string @@ -72,7 +72,11 @@ export class FieldTextController implements angular.IController { } inputChanged(): void { - this.fteModel = FieldTextController.escapeHTML(this.textFieldValue); + this.fteModel = FieldTextController + .escapeHTML(this.textFieldValue); + if (!this.fteMultiline) { + this.fteModel = this.fteModel.replace(/\n/g, ' '); + } } private static unescapeHTML(str: string): string { From 629a88a8a1fbc8db403808c7adff43218dd61640 Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Mon, 3 Jul 2023 12:08:42 +0200 Subject: [PATCH 2/2] Set context for every service in docker --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 2a1f8353be..a55e30456d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ version: '3.5' services: ui-builder: build: + context: . dockerfile: docker/ui-builder/Dockerfile image: lf-ui-builder container_name: lf-ui-builder @@ -25,6 +26,7 @@ services: app: build: + context: . dockerfile: docker/app/Dockerfile args: - ENVIRONMENT=development @@ -236,6 +238,7 @@ services: e2e-app: build: + context: . dockerfile: docker/app/Dockerfile args: - ENVIRONMENT=development @@ -275,6 +278,7 @@ services: test-php: build: + context: . dockerfile: docker/test-php/Dockerfile image: lf-test-php container_name: lf-test-php @@ -302,6 +306,7 @@ services: composer-dev: build: + context: . dockerfile: docker/composer-dev/Dockerfile image: lf-composer-dev container_name: lf-composer-dev