From 49ea68c27d466887abc6c4301f3f4267b14844ed Mon Sep 17 00:00:00 2001 From: jorenn92 Date: Sat, 20 Jan 2024 00:29:05 +0100 Subject: [PATCH] refactor: Uniform toast message style --- server/src/modules/rules/helpers/yaml.service.ts | 4 ++-- ui/src/components/Collection/index.tsx | 2 +- ui/src/components/Rules/RuleGroup/AddModal/index.tsx | 2 +- ui/src/components/Rules/index.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/modules/rules/helpers/yaml.service.ts b/server/src/modules/rules/helpers/yaml.service.ts index f106efc1..0a53c667 100644 --- a/server/src/modules/rules/helpers/yaml.service.ts +++ b/server/src/modules/rules/helpers/yaml.service.ts @@ -109,14 +109,14 @@ export class RuleYamlService { if (+mediaType !== +EPlexDataType[decoded.mediaType.toUpperCase()]) { this.logger.warn(`Yaml import failed. Incompatible media types`); this.logger.debug( - `media type with ID ${+mediaType} is not compatible with media type with ID ${ + `Media type with ID ${+mediaType} is not compatible with media type with ID ${ EPlexDataType[decoded.mediaType.toUpperCase()] } `, ); return { code: 0, - message: 'Yaml import failed. Incompatible media types', + message: 'Yaml import failed. Incompatible media types.', }; } diff --git a/ui/src/components/Collection/index.tsx b/ui/src/components/Collection/index.tsx index 99afb99f..b8278fbc 100644 --- a/ui/src/components/Collection/index.tsx +++ b/ui/src/components/Collection/index.tsx @@ -77,7 +77,7 @@ const Collection = () => { const doActions = () => { PostApiHandler('/collections/handle', {}) addToast( - 'Initiated collection handling in the background, Consult the logs for status updates.', + 'Initiated collection handling in the background, consult the logs for status updates.', { autoDismiss: true, appearance: 'success', diff --git a/ui/src/components/Rules/RuleGroup/AddModal/index.tsx b/ui/src/components/Rules/RuleGroup/AddModal/index.tsx index 061e91a1..24266493 100644 --- a/ui/src/components/Rules/RuleGroup/AddModal/index.tsx +++ b/ui/src/components/Rules/RuleGroup/AddModal/index.tsx @@ -167,7 +167,7 @@ const AddModal = (props: AddModal) => { response.result, ) handleLoadRules(result.rules) - addToast('Successfully imported rules from Yaml', { + addToast('Successfully imported rules from Yaml.', { autoDismiss: true, appearance: 'success', }) diff --git a/ui/src/components/Rules/index.tsx b/ui/src/components/Rules/index.tsx index 045c562a..f5c0176d 100644 --- a/ui/src/components/Rules/index.tsx +++ b/ui/src/components/Rules/index.tsx @@ -57,7 +57,7 @@ const Rules: React.FC = () => { const sync = () => { PostApiHandler(`/rules/execute`, {}) addToast( - 'Initiated rule execution in the background. Consult the logs for status updates.', + 'Initiated rule execution in the background, consult the logs for status updates.', { autoDismiss: true, appearance: 'success',