license information, trash normalization actions for excluded pages
This commit is contained in:
parent
915d61fc8b
commit
bcab9a0071
@ -19,11 +19,6 @@
|
||||
<div>{{ configService.values.BACKEND_APP_VERSION || '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div translate="license-info-screen.frontend-version"></div>
|
||||
<div>{{ configService.values.FRONTEND_APP_VERSION || '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div translate="license-info-screen.custom-app-title"></div>
|
||||
<div>{{ configService.values.APP_NAME || '-' }}</div>
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
<div class="cell">
|
||||
<span class="small-label">
|
||||
{{ entity.softDeletedTime | date: 'd MMM. yyyy, hh:mm a' }}
|
||||
{{ entity.softDeletedTime | date: 'exactDate' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -249,6 +249,7 @@ export class PdfViewerComponent implements OnInit, OnChanges {
|
||||
} else {
|
||||
this._ngZone.run(() => this.pageChanged.emit(pageNumber));
|
||||
}
|
||||
this._handleCustomActions();
|
||||
});
|
||||
|
||||
this.instance.Core.documentViewer.on('documentLoaded', this._documentLoaded);
|
||||
@ -296,7 +297,7 @@ export class PdfViewerComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
private _setSelectionMode(): void {
|
||||
const textTool = (<unknown> this.instance.Core.Tools.TextTool) as TextTool;
|
||||
const textTool = (<unknown>this.instance.Core.Tools.TextTool) as TextTool;
|
||||
textTool.SELECTION_MODE = this._configService.values.SELECTION_MODE;
|
||||
}
|
||||
|
||||
@ -528,7 +529,7 @@ export class PdfViewerComponent implements OnInit, OnChanges {
|
||||
|
||||
private _handleCustomActions() {
|
||||
this.instance.UI.setToolMode('AnnotationEdit');
|
||||
if (this.canPerformActions) {
|
||||
if (this.canPerformActions && !this.utils.isCurrentPageExcluded) {
|
||||
this.instance.UI.enableTools(['AnnotationCreateRectangle']);
|
||||
this.instance.UI.enableElements([
|
||||
'add-redaction',
|
||||
|
||||
@ -544,6 +544,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
|
||||
private async _doStampExcludedPages(excludedPages: number[]) {
|
||||
if (excludedPages && excludedPages.length > 0) {
|
||||
this.viewerComponent.utils.excludedPages = excludedPages;
|
||||
const pdfNet = this._instance.Core.PDFNet;
|
||||
const document = await this._instance.Core.documentViewer.getDocument().getPDFDoc();
|
||||
await clearStamps(document, pdfNet, [...Array(this.fileData.file.numberOfPages).keys()]);
|
||||
|
||||
@ -126,6 +126,7 @@ export class AnnotationActionsService {
|
||||
annotations: AnnotationWrapper[],
|
||||
annotationsChanged: EventEmitter<AnnotationWrapper>,
|
||||
): Record<string, unknown>[] {
|
||||
console.log('============ get actions');
|
||||
const availableActions = [];
|
||||
|
||||
const annotationPermissions = annotations.map(annotation => ({
|
||||
|
||||
@ -40,6 +40,7 @@ const DISABLED_HOTKEYS = [
|
||||
|
||||
export class PdfViewerUtils {
|
||||
ready = false;
|
||||
excludedPages: number[] = [];
|
||||
|
||||
constructor(readonly instance: WebViewerInstance, public viewMode: ViewMode, public multiSelectActive: boolean) {}
|
||||
|
||||
@ -51,6 +52,11 @@ export class PdfViewerUtils {
|
||||
return this.isCompareMode ? 2 : 1;
|
||||
}
|
||||
|
||||
get isCurrentPageExcluded() {
|
||||
const currentPage = this.currentPage;
|
||||
return !!this.excludedPages?.includes(currentPage);
|
||||
}
|
||||
|
||||
get currentPage() {
|
||||
try {
|
||||
return this.isCompareMode ? Math.ceil(this._currentInternalPage / 2) : this._currentInternalPage;
|
||||
|
||||
0
package-lock.json
generated
0
package-lock.json
generated
Loading…
x
Reference in New Issue
Block a user