From b9b11e3b9afac44c77fa5ec219e938b5c55674d8 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 1 Dec 2023 13:01:07 +0200 Subject: [PATCH] UI: Minor fixes --- .../src/app/shared/components/image/image-gallery.component.ts | 2 +- ui-ngx/src/app/shared/import-export/import-export.service.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts index f821a42c33..af223e8563 100644 --- a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts +++ b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts @@ -259,7 +259,7 @@ export class ImageGalleryComponent extends PageComponent implements OnInit, OnDe } } else { this.gridImagesFilter = { - search: isNotEmptyStr(value) ? encodeURI(value) : null, + search: isNotEmptyStr(value) ? value.trim() : null, includeSystemImages: this.includeSystemImages }; this.cd.markForCheck(); diff --git a/ui-ngx/src/app/shared/import-export/import-export.service.ts b/ui-ngx/src/app/shared/import-export/import-export.service.ts index 1a06739adb..09a0042306 100644 --- a/ui-ngx/src/app/shared/import-export/import-export.service.ts +++ b/ui-ngx/src/app/shared/import-export/import-export.service.ts @@ -111,8 +111,7 @@ export class ImportExportService { this.imageService.exportImage(type, key).subscribe( { next: (imageData) => { - let name = imageData.title; - name = name.toLowerCase().replace(/\W/g, '_'); + const name = imageData.fileName.split('.')[0]; this.exportToPc(imageData, name); }, error: (e) => {