UI fallbacks
This commit is contained in:
parent
c1a47d4b1f
commit
ce2f7faac2
@ -1,13 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { forkJoin, Observable, of } from 'rxjs';
|
import { forkJoin, Observable, of } from 'rxjs';
|
||||||
import { map, tap } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
FileManagementControllerService,
|
FileManagementControllerService,
|
||||||
ManualRedactionControllerService,
|
ManualRedactionControllerService,
|
||||||
RedactionLogControllerService,
|
RedactionLogControllerService,
|
||||||
ViewedPagesControllerService
|
ViewedPagesControllerService
|
||||||
} from '@redaction/red-ui-http';
|
} from '@redaction/red-ui-http';
|
||||||
import { FileType } from '../../../models/file/file-type';
|
|
||||||
import { FileDataModel } from '../../../models/file/file-data.model';
|
import { FileDataModel } from '../../../models/file/file-data.model';
|
||||||
import { AppStateService } from '../../../state/app-state.service';
|
import { AppStateService } from '../../../state/app-state.service';
|
||||||
import { PermissionsService } from '../../../services/permissions.service';
|
import { PermissionsService } from '../../../services/permissions.service';
|
||||||
@ -31,10 +30,9 @@ export class PdfViewerDataService {
|
|||||||
loadActiveFileData(): Observable<FileDataModel> {
|
loadActiveFileData(): Observable<FileDataModel> {
|
||||||
const fileObs = this.downloadOriginalFile(this._appStateService.activeFile);
|
const fileObs = this.downloadOriginalFile(this._appStateService.activeFile);
|
||||||
const reactionLogObs = this._redactionLogControllerService.getRedactionLog(this._appStateService.activeProjectId, this._appStateService.activeFileId);
|
const reactionLogObs = this._redactionLogControllerService.getRedactionLog(this._appStateService.activeProjectId, this._appStateService.activeFileId);
|
||||||
const redactionChangeLogObs = this._redactionLogControllerService.getRedactionChangeLog(
|
const redactionChangeLogObs = this._redactionLogControllerService
|
||||||
this._appStateService.activeProjectId,
|
.getRedactionChangeLog(this._appStateService.activeProjectId, this._appStateService.activeFileId)
|
||||||
this._appStateService.activeFileId
|
.pipe(catchError(() => of({})));
|
||||||
);
|
|
||||||
const manualRedactionsObs = this._manualRedactionControllerService.getManualRedaction(
|
const manualRedactionsObs = this._manualRedactionControllerService.getManualRedaction(
|
||||||
this._appStateService.activeProjectId,
|
this._appStateService.activeProjectId,
|
||||||
this._appStateService.activeFileId
|
this._appStateService.activeFileId
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export class FileUploadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async uploadFiles(files: FileUploadModel[]): Promise<number> {
|
async uploadFiles(files: FileUploadModel[]): Promise<number> {
|
||||||
const maxSizeMB = this._appConfigService.getConfig(AppConfigKey.MAX_FILE_SIZE_MB, 50);
|
const maxSizeMB = this._appConfigService.getConfig(AppConfigKey.MAX_FILE_SIZE_MB, 100);
|
||||||
const maxSizeBytes = maxSizeMB * 1024 * 1024;
|
const maxSizeBytes = maxSizeMB * 1024 * 1024;
|
||||||
const projectFiles = this._appStateService.activeProject.files;
|
const projectFiles = this._appStateService.activeProject.files;
|
||||||
let option: 'overwrite' | 'skip' | undefined;
|
let option: 'overwrite' | 'skip' | undefined;
|
||||||
|
|||||||
@ -9,5 +9,6 @@
|
|||||||
"LICENSE_EMAIL": "todo-license@email.com",
|
"LICENSE_EMAIL": "todo-license@email.com",
|
||||||
"LICENSE_START": "01-01-2021",
|
"LICENSE_START": "01-01-2021",
|
||||||
"LICENSE_END": "31-12-2021",
|
"LICENSE_END": "31-12-2021",
|
||||||
"LICENSE_PAGE_COUNT": 1000000
|
"LICENSE_PAGE_COUNT": 1000000,
|
||||||
|
"MAX_FILE_SIZE_MB": 100
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user