more license fixes

This commit is contained in:
Timo 2021-02-22 11:54:03 +02:00
parent 2b54468a48
commit d72cf7be9a
5 changed files with 24 additions and 11 deletions

View File

@ -23,8 +23,8 @@ export class LicenseInformationScreenComponent {
public readonly appConfigService: AppConfigService
) {
this.totalLicensedNumberOfPages = this.appConfigService.getConfig('LICENSE_PAGE_COUNT', 0);
const startDate = moment(this.appConfigService.getConfig('LICENSING_START'), 'DD-MM-YYYY');
const endDate = moment(this.appConfigService.getConfig('LICENSING_END'), 'DD-MM-YYYY');
const startDate = moment(this.appConfigService.getConfig('LICENSE_START'), 'DD-MM-YYYY');
const endDate = moment(this.appConfigService.getConfig('LICENSE_END'), 'DD-MM-YYYY');
const currentConfig = {
startDate: startDate.toDate(),
endDate: endDate.toDate()

View File

@ -14,7 +14,7 @@ import {
} from '@angular/core';
import { AppConfigService } from '../../../app-config/app-config.service';
import { ManualRedactionEntry, Rectangle } from '@redaction/red-ui-http';
import WebViewer, { Annotations, WebViewerInstance } from '@pdftron/webviewer';
import WebViewer, { Annotations, Tools, WebViewerInstance } from '@pdftron/webviewer';
import { TranslateService } from '@ngx-translate/core';
import { ManualRedactionEntryWrapper } from '../model/manual-redaction-entry.wrapper';
import { AppStateService } from '../../../state/app-state.service';
@ -27,6 +27,7 @@ import { AnnotationDrawService } from '../service/annotation-draw.service';
import { AnnotationActionsService } from '../../../common/service/annotation-actions.service';
import { UserPreferenceService } from '../../../common/service/user-preference.service';
import { translateQuads } from '../../../utils/pdf-coordinates';
import Tool = Tools.Tool;
@Component({
selector: 'redaction-pdf-viewer',
@ -56,6 +57,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
instance: WebViewerInstance;
private readonly _allowedKeyboardShortcuts = ['+', '-', 'p', 'r', 'Escape'];
private _defaultTool: Tool;
constructor(
private readonly kc: KeycloakService,
@ -403,6 +405,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
private _documentLoaded() {
this._ngZone.run(() => {
this._defaultTool = this.instance.getToolMode();
this.viewerReady.emit(this.instance);
this.setInitialViewerState();
});

View File

@ -286,8 +286,8 @@ export class AppStateService {
// this._automaticallyReanalyseErrorFiles(project);
this._computeStats();
fileReanalysedEvent.forEach((file) => this.fileReanalysed.emit(file));
fileStatusChangedEvent.forEach((file) => this.fileChanged.emit(file));
// fileReanalysedEvent.forEach((file) => this.fileReanalysed.emit(file));
// fileStatusChangedEvent.forEach((file) => this.fileChanged.emit(file));
return files;
}

View File

@ -1,13 +1,23 @@
import { enableProdMode } from '@angular/core';
import { ApplicationRef, enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { enableDebugTools } from '@angular/platform-browser';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic();
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
.then((moduleRef) => {
if (!environment.production) {
const applicationRef = moduleRef.injector.get(ApplicationRef);
const componentRef = applicationRef.components[0];
// allows to run `ng.profiler.timeChangeDetection();`
enableDebugTools(componentRef);
}
})
.catch((err) => window['console'].error(err));

View File

@ -9,8 +9,8 @@ ADMIN_CONTACT_URL="${ADMIN_CONTACT_URL:-}"
AUTO_READ_TIME="${AUTO_READ_TIME:-1.5}"
MAX_FILE_SIZE_MB="${MAX_FILE_SIZE_MB:-50}"
LICENSING_START="${LICENSING_START:-01-01-2021}"
LICENSING_END="${LICENSING_END:-31-12-2021}"
LICENSE_START="${LICENSE_START:-01-01-2021}"
LICENSE_END="${LICENSE_END:-31-12-2021}"
LICENSE_PAGE_COUNT="${LICENSE_PAGE_COUNT:-1000000}"
LICENSE_CUSTOMER="${LICENSE_CUSTOMER:-Developement License}"
@ -20,8 +20,8 @@ echo '{
"OAUTH_URL":"'"$OAUTH_URL"'",
"ADMIN_CONTACT_NAME":"'"$ADMIN_CONTACT_NAME"'",
"ADMIN_CONTACT_URL":"'"$ADMIN_CONTACT_URL"'",
"LICENSING_START":"'"$LICENSING_START"'",
"LICENSING_END":"'"$LICENSING_END"'",
"LICENSE_START":"'"$LICENSE_START"'",
"LICENSE_END":"'"$LICENSE_END"'",
"LICENSE_PAGE_COUNT":'"$LICENSE_PAGE_COUNT"',
"LICENSE_CUSTOMER":"'"$LICENSE_CUSTOMER"'",
"APP_NAME":"'"$APP_NAME"'",