diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 7f674df20..da16ff037 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -53,6 +53,7 @@ import { SimpleDoughnutChartComponent } from './components/simple-doughnut-chart import { ManualRedactionDialogComponent } from './screens/file/manual-redaction-dialog/manual-redaction-dialog.component'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { AnnotationIconComponent } from './components/annotation-icon/annotation-icon.component'; export function HttpLoaderFactory(httpClient: HttpClient) { return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json'); @@ -76,6 +77,7 @@ export function HttpLoaderFactory(httpClient: HttpClient) { LogoComponent, SimpleDoughnutChartComponent, ManualRedactionDialogComponent, + AnnotationIconComponent, ], imports: [ BrowserModule, diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html new file mode 100644 index 000000000..73d7131ff --- /dev/null +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html @@ -0,0 +1,3 @@ +
+ {{ type[0] }} +
diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss new file mode 100644 index 000000000..c3269744d --- /dev/null +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss @@ -0,0 +1,64 @@ +@import "../../../assets/styles/red-variables"; + +.icon { + height: 16px; + width: 16px; + font-size: 11px; + line-height: 14px; + font-weight: 600; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + text-transform: uppercase; + color: $white; +} + +.suggestion { + width: 0; + height: 0; + border: 9px solid transparent; + border-bottom-color: $grey-1; + position: relative; + top: -9px; + + &:after { + content: ''; + position: absolute; + left: -9px; + top: 9px; + width: 0; + height: 0; + border: 9px solid transparent; + border-top-color: $grey-1; + } + + span { + transform: translateY(9px); + z-index: 2; + } +} + +.hint, .comment, .ignore { + border-radius: 50%; +} + +.hint, .redaction, .comment { + background-color: $grey-1; +} + +.ignore { + background-color: $grey-5; +} + +.hint_only { + background-color: $orange-1; +} + +.vertebrate { + background-color: $green-1; +} + +.names { + background-color: $yellow-2; +} diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts new file mode 100644 index 000000000..fbc913620 --- /dev/null +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts @@ -0,0 +1,16 @@ +import { Component, Input, OnInit } from '@angular/core'; + +@Component({ + selector: 'redaction-annotation-icon', + templateUrl: './annotation-icon.component.html', + styleUrls: ['./annotation-icon.component.scss'] +}) +export class AnnotationIconComponent implements OnInit { + @Input() public type: 'hint' | 'redaction' | 'suggestion' | 'ignore' | 'comment'; + + constructor() { + } + + ngOnInit(): void { + } +} diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html index 887c2bdb2..e38588243 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html @@ -1,4 +1,4 @@ -
+
-
+
{{ dataTotal }}
-
{{ subtitle }}
+
{{ subtitle | translate }}
-
+
+ [config]="[{ length: val.value, color: val.color, label: val.value + ' ' + (val.label | translate | lowercase) }]">
diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss index a1bcc530b..90889090e 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss @@ -3,8 +3,12 @@ .container { position: relative; display: flex; - flex-direction: column; align-items: center; + gap: 20px; + + &.column { + flex-direction: column; + } } .text-container { @@ -14,6 +18,7 @@ flex-direction: column; justify-content: center; align-items: center; + box-sizing: border-box; } .breakdown-container { diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts index 848557486..d3797ecda 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts @@ -19,6 +19,7 @@ export class SimpleDoughnutChartComponent implements OnInit { @Input() angleOffset = -90; @Input() radius = 85; @Input() strokeWidth = 20; + @Input() direction: 'row' | 'column' = 'column'; public chartData: any[] = []; public perimeter: number; diff --git a/apps/red-ui/src/app/icons/icons.module.ts b/apps/red-ui/src/app/icons/icons.module.ts index 0e45e19d7..b9f2651fe 100644 --- a/apps/red-ui/src/app/icons/icons.module.ts +++ b/apps/red-ui/src/app/icons/icons.module.ts @@ -15,7 +15,7 @@ export class IconsModule { ) { const icons = [ 'add', 'analyse', 'arrow-down', 'arrow-up', 'assign', 'calendar', 'check', - 'close', 'document', 'double-chevron-right', 'download', 'drop-down-arrow', + 'close', 'document', 'double-chevron-right', 'download', 'edit', 'error', 'folder', 'info', 'lightning', 'logout', 'menu', 'pages', 'plus', 'preview', 'refresh', 'report', 'secret', 'sort-asc', 'sort-desc', 'status', 'trash', 'user' diff --git a/apps/red-ui/src/app/screens/base-screen/base-screen.component.html b/apps/red-ui/src/app/screens/base-screen/base-screen.component.html index 4ee93847d..a7c27a36d 100644 --- a/apps/red-ui/src/app/screens/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/screens/base-screen/base-screen.component.html @@ -40,11 +40,8 @@