Fixed various ui issues

This commit is contained in:
Timo Bejan 2022-03-29 20:21:25 +03:00
parent dd865c509c
commit 42b840681f
3 changed files with 13 additions and 3 deletions

View File

@ -79,7 +79,13 @@ export class AnnotationWrapper implements Record<string, unknown> {
}
get canBeMarkedAsFalsePositive() {
return (this.isRecommendation || this.superType === SuperTypes.Redaction) && !this.isImage && !this.imported && !this.pending;
return (
(this.isRecommendation || this.superType === SuperTypes.Redaction) &&
!this.isImage &&
!this.imported &&
!this.pending &&
!this.hasBeenResized
);
}
get isSuperTypeBasedColor() {

View File

@ -4,7 +4,9 @@
<div class="flex-1">
<div>
<strong>{{ annotation.typeLabel | translate }}</strong
>&nbsp;<strong *ngIf="annotation.pending" class="pending-analysis">{{ 'annotation.pending' | translate }}</strong>
>&nbsp;<strong *ngIf="annotation.pending && !annotation.isSuggestion" class="pending-analysis">{{
'annotation.pending' | translate
}}</strong>
</div>
<div *ngIf="annotation.type !== 'manual' && !annotation.isHighlight">
<strong>

View File

@ -13,6 +13,7 @@ import { map, switchMap, tap } from 'rxjs/operators';
import { KeycloakService } from 'keycloak-angular';
import { UserService } from '@services/user.service';
import { EntitiesService, List, mapEach, RequiredParam, Validate } from '@iqser/common-ui';
import { NGXLogger } from 'ngx-logger';
@Injectable()
export class FileDownloadService extends EntitiesService<DownloadStatus, IDownloadStatus> {
@ -21,6 +22,7 @@ export class FileDownloadService extends EntitiesService<DownloadStatus, IDownlo
private readonly _keycloakService: KeycloakService,
private readonly _configService: ConfigService,
protected readonly _injector: Injector,
private readonly _logger: NGXLogger,
) {
super(_injector, DownloadStatus, 'async/download');
}
@ -49,7 +51,7 @@ export class FileDownloadService extends EntitiesService<DownloadStatus, IDownlo
anchor.href = `${this._configService.values.API_URL}/async/download/${token.value}`;
anchor.download = status.filename;
anchor.target = '_blank';
this._logger.info('[DOWNLOAD] Downloading with link: ', anchor.href);
document.body.appendChild(anchor);
anchor.click();
document.body.removeChild(anchor);