From f2ac0ff81e2c46583a32f8f08c34969a2f3934fe Mon Sep 17 00:00:00 2001 From: jsteenke <146953549+jsteenke@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:17:01 +0200 Subject: [PATCH] feat: add displayname export import (#172) * feat: add displayName * feat: add displayName * fix: tests added * feat: exim add displayName --- src/app/shared/generated/model/eximTheme.ts | 1 + src/app/theme/theme-import/theme-import.component.ts | 3 +++ src/assets/api/openapi-bff.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/app/shared/generated/model/eximTheme.ts b/src/app/shared/generated/model/eximTheme.ts index 2d1a3ec..87704a6 100644 --- a/src/app/shared/generated/model/eximTheme.ts +++ b/src/app/shared/generated/model/eximTheme.ts @@ -13,6 +13,7 @@ import { Image } from './image'; export interface EximTheme { + displayName?: string; cssFile?: string; description?: string; assetsUrl?: string; diff --git a/src/app/theme/theme-import/theme-import.component.ts b/src/app/theme/theme-import/theme-import.component.ts index 8f78705..fdb1470 100644 --- a/src/app/theme/theme-import/theme-import.component.ts +++ b/src/app/theme/theme-import/theme-import.component.ts @@ -83,6 +83,9 @@ export class ThemeImportComponent implements OnInit { Object.defineProperty(this.themeSnapshot.themes, this.themeName, themeProps ?? {}) delete this.themeSnapshot.themes[key[0]] } + if (!this.themeSnapshot?.themes['displayName']) { + this.themeSnapshot.themes[key[0]] = { ...this.themeSnapshot.themes[key[0]], displayName: this.themeName } + } this.themeApi .importThemes({ themeSnapshot: this.themeSnapshot diff --git a/src/assets/api/openapi-bff.yaml b/src/assets/api/openapi-bff.yaml index 94063c1..71afaa4 100644 --- a/src/assets/api/openapi-bff.yaml +++ b/src/assets/api/openapi-bff.yaml @@ -625,6 +625,8 @@ components: EximTheme: type: object properties: + displayName: + type: string cssFile: type: string description: