RED-4525 integrated default colors

This commit is contained in:
Timo Bejan 2022-07-11 22:38:14 +03:00
parent cd4a166421
commit 45a4b6a930
3 changed files with 21 additions and 23 deletions

View File

@ -14,7 +14,7 @@ export const SuperTypes = {
IgnoredHint: 'hint-ignored',
Skipped: 'skipped',
Redaction: 'redaction',
ManualRedaction: 'manual-redaction',
ManualRedaction: 'manual',
Recommendation: 'recommendation',
Hint: 'hint',
DeclinedSuggestion: 'suggestion-declined',

View File

@ -237,29 +237,26 @@ export class DictionaryService extends EntitiesService<IDictionary, Dictionary>
}),
map(colors => {
const virtualTypes = [
{ hexColor: colors.notRedacted || FALLBACK_COLOR, type: SuperTypes.DeclinedSuggestion },
{ hexColor: colors.manualRedactionColor || FALLBACK_COLOR, type: 'manual' },
{ hexColor: colors.ignoredHintColor || FALLBACK_COLOR, type: SuperTypes.IgnoredHint },
{ hexColor: colors.manualRedactionColor || FALLBACK_COLOR, type: SuperTypes.ManualRedaction },
{ hexColor: colors.skippedColor || FALLBACK_COLOR, type: SuperTypes.DeclinedSuggestion },
// dictionary actions
{ hexColor: '#c5d3eb', type: SuperTypes.Recommendation },
{ hexColor: colors.recommendationColor || FALLBACK_COLOR, type: SuperTypes.Recommendation },
{ hexColor: colors.analysisColor || FALLBACK_COLOR, type: 'remove-only-here' },
// generic suggestions
{ hexColor: colors.requestAdd || FALLBACK_COLOR, type: 'suggestion' },
{ hexColor: colors.requestAdd || FALLBACK_COLOR, type: SuperTypes.SuggestionAdd },
{ hexColor: colors.requestAddColor || FALLBACK_COLOR, type: 'suggestion' },
{ hexColor: colors.requestAddColor || FALLBACK_COLOR, type: SuperTypes.SuggestionAdd },
// add suggestions
{ hexColor: colors.requestAdd || FALLBACK_COLOR, type: SuperTypes.SuggestionChangeLegalBasis },
{ hexColor: colors.requestAdd || FALLBACK_COLOR, type: SuperTypes.SuggestionRecategorizeImage },
{ hexColor: colors.requestAddColor || FALLBACK_COLOR, type: SuperTypes.SuggestionChangeLegalBasis },
{ hexColor: colors.requestAddColor || FALLBACK_COLOR, type: SuperTypes.SuggestionRecategorizeImage },
{ hexColor: colors.dictionaryRequestColor || FALLBACK_COLOR, type: SuperTypes.SuggestionAddDictionary },
{ hexColor: colors.dictionaryRequestColor || FALLBACK_COLOR, type: SuperTypes.SuggestionResize },
{ hexColor: colors.requestRemove || FALLBACK_COLOR, type: SuperTypes.SuggestionRemove },
{ hexColor: colors.requestRemoveColor || FALLBACK_COLOR, type: SuperTypes.SuggestionRemove },
{ hexColor: colors.dictionaryRequestColor || FALLBACK_COLOR, type: SuperTypes.SuggestionRemoveDictionary },
{ hexColor: colors.notRedacted || FALLBACK_COLOR, type: SuperTypes.Skipped },
{ hexColor: colors.defaultColor || FALLBACK_COLOR, type: 'default' },
{ hexColor: colors.requestAdd || FALLBACK_COLOR, type: 'add' },
{ hexColor: colors.skippedColor || FALLBACK_COLOR, type: SuperTypes.Skipped },
{ hexColor: colors.requestAddColor || FALLBACK_COLOR, type: 'add' },
{ hexColor: colors.analysisColor || FALLBACK_COLOR, type: 'analysis' },
{ hexColor: '#fa98f7', type: 'hint', hint: true },
{ hexColor: colors.manualRedactionColor || FALLBACK_COLOR, type: 'redaction' },
{ hexColor: colors.hintColor || FALLBACK_COLOR, type: SuperTypes.Hint, hint: true },
{ hexColor: colors.ignoredHintColor || FALLBACK_COLOR, type: SuperTypes.IgnoredHint, hint: true },
{ hexColor: colors.redactionColor || FALLBACK_COLOR, type: SuperTypes.Redaction },
{ hexColor: colors.previewColor || FALLBACK_COLOR, type: 'preview' },
{ hexColor: colors.updatedColor || FALLBACK_COLOR, type: 'updated' },
];

View File

@ -1,13 +1,14 @@
export interface IColors {
analysisColor?: string;
defaultColor?: string;
dictionaryRequestColor?: string;
dossierTemplateId?: string;
manualRedactionColor?: string;
notRedacted?: string;
requestAddColor?: string;
requestRemoveColor?: string;
dictionaryRequestColor?: string;
previewColor?: string;
requestAdd?: string;
requestRemove?: string;
analysisColor?: string;
updatedColor?: string;
recommendationColor?: string;
hintColor?: string;
redactionColor?: string;
ignoredHintColor?: string;
skippedColor?: string;
}