colors fix

This commit is contained in:
Timo 2021-02-18 19:33:56 +02:00
parent dd4ecfbf73
commit ea9f9923d5
6 changed files with 39 additions and 17 deletions

View File

@ -1,6 +1,6 @@
<div class="needs-work">
<redaction-annotation-icon *ngIf="reanalysisRequired()" type="square" label="A" color="#dd4d50"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="hasUpdates" type="square" label="U" color="#fdbd00"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="reanalysisRequired()" type="square" label="A" [color]="analysisColor"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="hasUpdates" type="square" label="U" [color]="updatedColor"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="needsWorkInput.hasRedactions" type="square" label="R" color="#283241"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="hasImages" type="square" label="I" [color]="imageColor"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="needsWorkInput.hintsOnly" type="circle" label="H" color="#9398a0"></redaction-annotation-icon>

View File

@ -32,6 +32,14 @@ export class NeedsWorkBadgeComponent implements OnInit {
return this._getDictionaryColor('image');
}
get updatedColor() {
return this._getDictionaryColor('updated');
}
get analysisColor() {
return this._getDictionaryColor('analysis');
}
get hasImages() {
return this.needsWorkInput instanceof FileStatusWrapper && this.needsWorkInput.hasImages;
}

View File

@ -7,7 +7,7 @@ import { Color } from '../../utils/types';
styleUrls: ['./status-bar.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class StatusBarComponent implements OnInit {
export class StatusBarComponent {
@Input()
public config: {
length: number;
@ -20,8 +20,4 @@ export class StatusBarComponent implements OnInit {
public small = false;
constructor() {}
ngOnInit(): void {
console.log(this.config);
}
}

View File

@ -32,7 +32,7 @@
<redaction-annotation-icon *ngIf="filter.key === 'none'" label="-" color="transparent" type="none"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="filter.key === 'updated'" type="square" label="U" color="#fdbd00"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="filter.key === 'updated'" type="square" label="U" [color]="dictionaryColor"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="filter.key === 'image'" type="square" label="I" [color]="dictionaryColor"></redaction-annotation-icon>
{{ filter.label | translate }}

View File

@ -466,10 +466,18 @@ export class AppStateService {
};
// manual
dictionaryData['manual'] = {
hexColor: colors.defaultColor,
hexColor: colors.manualRedactionColor,
type: 'manual',
virtual: true
};
// manual
dictionaryData['manual-redaction'] = {
hexColor: colors.manualRedactionColor,
type: 'manual-redaction',
virtual: true
};
console.log(colors.manualRedactionColor);
// dictionary actions
dictionaryData['recommendation'] = {
@ -479,17 +487,17 @@ export class AppStateService {
};
// dictionary actions
dictionaryData['add-dictionary'] = {
hexColor: '#dd4d50',
hexColor: colors.analysisColor,
type: 'add-dictionary',
virtual: true
};
dictionaryData['remove-dictionary'] = {
hexColor: '#dd4d50',
hexColor: colors.analysisColor,
type: 'remove-dictionary',
virtual: true
};
dictionaryData['remove-only-here'] = {
hexColor: '#dd4d50',
hexColor: colors.analysisColor,
type: 'remove-only-here',
virtual: true
};
@ -506,7 +514,7 @@ export class AppStateService {
virtual: true
};
dictionaryData['suggestion-add-dictionary'] = {
hexColor: '#5B97DB',
hexColor: colors.dictionaryRequestColor,
type: 'suggestion-add',
virtual: true
};
@ -517,7 +525,7 @@ export class AppStateService {
virtual: true
};
dictionaryData['suggestion-remove-dictionary'] = {
hexColor: '#5B97DB',
hexColor: colors.dictionaryRequestColor,
type: 'suggestion-add',
virtual: true
};
@ -538,12 +546,12 @@ export class AppStateService {
virtual: true
};
dictionaryData['analysis'] = {
hexColor: '#dd4d50',
hexColor: colors.analysisColor,
type: 'analysis',
virtual: true
};
dictionaryData['pending-analysis'] = {
hexColor: '#dd4d50',
hexColor: colors.analysisColor,
type: 'analysis',
virtual: true
};
@ -554,10 +562,15 @@ export class AppStateService {
hint: true
};
dictionaryData['redaction'] = {
hexColor: '#cccccc',
hexColor: colors.previewColor,
type: 'redaction',
virtual: true
};
dictionaryData['updated'] = {
hexColor: colors.updatedColor,
type: 'updated',
virtual: true
};
})
);

View File

@ -15,4 +15,9 @@ export interface Colors {
notRedacted?: string;
requestAdd?: string;
requestRemove?: string;
analysisColor?: string;
dictionaryRequestColor?: string;
manualRedactionColor?: string;
previewColor?: string;
updatedColor?: string;
}