minor adjustments to tooltips
This commit is contained in:
parent
71887a43b4
commit
173f7004a6
@ -33,6 +33,7 @@
|
||||
(action)="downloadFileRedactionReport($event, fileStatus)"
|
||||
*ngIf="permissionsService.canShowRedactionReportDownloadBtn(fileStatus)"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltipClass]="'small'"
|
||||
[tooltip]="fileStatus.isApproved ? 'report.action' : 'report.unavailable-single'"
|
||||
[disabled]="!fileStatus.isApproved"
|
||||
icon="red:report"
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
class="ml-8"
|
||||
[routerLink]="['/ui/projects/' + appStateService.activeProjectId]"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
tooltipPosition="before"
|
||||
icon="red:close"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { ViewedPages, ViewedPagesControllerService } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '../../../state/app-state.service';
|
||||
import { PermissionsService } from '../../../common/service/permissions.service';
|
||||
import { AppConfigKey, AppConfigService } from '../../../app-config/app-config.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-page-indicator',
|
||||
templateUrl: './page-indicator.component.html',
|
||||
styleUrls: ['./page-indicator.component.scss']
|
||||
})
|
||||
export class PageIndicatorComponent implements OnChanges, OnInit {
|
||||
export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Input() active: boolean;
|
||||
@Input() number: number;
|
||||
@Input() viewedPages: ViewedPages;
|
||||
@ -18,6 +19,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit {
|
||||
|
||||
pageReadTimeout: number = null;
|
||||
canMarkPagesAsViewed: boolean;
|
||||
private _subscription: Subscription;
|
||||
|
||||
constructor(
|
||||
private readonly _viewedPagesControllerService: ViewedPagesControllerService,
|
||||
@ -27,7 +29,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this._appStateService.fileChanged.subscribe(() => {
|
||||
this._subscription = this._appStateService.fileChanged.subscribe(() => {
|
||||
this.canMarkPagesAsViewed = this._permissionService.canMarkPagesAsViewed();
|
||||
});
|
||||
}
|
||||
@ -97,4 +99,10 @@ export class PageIndicatorComponent implements OnChanges, OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (this._subscription) {
|
||||
this._subscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
class="ml-6"
|
||||
[routerLink]="['/ui/projects/']"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
tooltipPosition="before"
|
||||
icon="red:close"
|
||||
></redaction-circle-button>
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
&.small {
|
||||
max-width: 180px;
|
||||
max-width: 160px;
|
||||
}
|
||||
|
||||
&.warn {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user