From ef425e9ec7efc4d110934724a174b87b52042aa6 Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Tue, 5 Oct 2021 08:30:19 +0200 Subject: [PATCH] Rename "CustomText" to "Formattable" to match the API naming --- frontend/src/app/core/state/hal-resource.ts | 6 +++--- .../state/in-app-notifications/in-app-notification.model.ts | 4 ++-- frontend/src/app/core/state/projects/project.model.ts | 6 +++--- .../entry/in-app-notification-entry.component.ts | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/core/state/hal-resource.ts b/frontend/src/app/core/state/hal-resource.ts index ad8187f872..bc6e47f03d 100644 --- a/frontend/src/app/core/state/hal-resource.ts +++ b/frontend/src/app/core/state/hal-resource.ts @@ -10,10 +10,10 @@ export interface HalResourceLink { */ export type HalResourceLinks = Record; -export type CustomTextFormat = 'markdown'|'custom'; +export type FormattableFormat = 'markdown'|'custom'; -export interface CustomText { - format:CustomTextFormat; +export interface Formattable { + format:FormattableFormat; raw:string; html:string; } diff --git a/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts b/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts index 51ac5fdd7b..ed68ee588a 100644 --- a/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts +++ b/frontend/src/app/core/state/in-app-notifications/in-app-notification.model.ts @@ -2,7 +2,7 @@ import { ID } from '@datorama/akita'; import { HalResourceLink, HalResourceLinks, - CustomText, + Formattable, } from 'core-app/core/state/hal-resource'; export const NOTIFICATIONS_MAX_SIZE = 100; @@ -23,7 +23,7 @@ export interface InAppNotification { readIAN:boolean|null; readEmail:boolean|null; - details?:CustomText[]; + details?:Formattable[]; // Mark a notification to be kept in the center even though it was saved as "read". keep?:boolean; // Show message of a notification? diff --git a/frontend/src/app/core/state/projects/project.model.ts b/frontend/src/app/core/state/projects/project.model.ts index bcacb9d853..baf62ea700 100644 --- a/frontend/src/app/core/state/projects/project.model.ts +++ b/frontend/src/app/core/state/projects/project.model.ts @@ -2,7 +2,7 @@ import { ID } from '@datorama/akita'; import { HalResourceLink, HalResourceLinks, - CustomText, + Formattable, } from 'core-app/core/state/hal-resource'; export const PROJECTS_MAX_SIZE = 100; @@ -22,8 +22,8 @@ export interface Project { name:string; public:boolean; active:boolean; - statusExplanation:CustomText; - description:CustomText; + statusExplanation:Formattable; + description:Formattable; createdAt:string; updatedAt:string; diff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts index 3b63efb701..7935aa494b 100644 --- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts +++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts @@ -27,7 +27,7 @@ import { take } from 'rxjs/internal/operators/take'; import { StateService } from '@uirouter/angular'; import { HalResource } from 'core-app/features/hal/resources/hal-resource'; import { BackRouteOptions } from 'core-app/features/work-packages/components/back-routing/back-routing.service'; -import { CustomText } from 'core-app/core/state/hal-resource'; +import { Formattable } from 'core-app/core/state/hal-resource'; import { InAppNotification } from 'core-app/core/state/in-app-notifications/in-app-notification.model'; import { IanCenterService } from 'core-app/features/in-app-notifications/center/state/ian-center.service'; @@ -50,10 +50,10 @@ export class InAppNotificationEntryComponent implements OnInit { loading$ = this.storeService.query.selectLoading(); // Formattable body, if any - body:CustomText[]; + body:Formattable[]; // custom rendered details, if any - details:CustomText[]; + details:Formattable[]; // Whether body and details are empty unexpandable = false;