mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
ACS-8404: Update application settings service (#3988)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
[ngClass]="{
|
||||
'aca-right_side--hide': !showRightSide
|
||||
}"
|
||||
[maxRetries]="'viewer.maxRetries' | adfAppConfig"
|
||||
[maxRetries]="settings.viewerMaxRetries"
|
||||
[nodeId]="nodeId"
|
||||
[versionId]="versionId"
|
||||
[allowNavigate]="navigateMultiple"
|
||||
@@ -14,7 +14,7 @@
|
||||
[allowFullScreen]="false"
|
||||
[overlayMode]="true"
|
||||
[hideInfoButton]="true"
|
||||
[closeButtonPosition]="'viewer.closeButtonPosition' | adfAppConfig: 'right'"
|
||||
[closeButtonPosition]="settings.viewerCloseButtonPosition"
|
||||
(showViewerChange)="onViewerVisibilityChanged()"
|
||||
[canNavigateBefore]="!!previousNodeId"
|
||||
[canNavigateNext]="!!nextNodeId"
|
||||
|
@@ -39,7 +39,6 @@ import {
|
||||
} from '@alfresco/aca-shared';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { AcaViewerModule } from '../../viewer.module';
|
||||
|
||||
const apiError = `{
|
||||
"error": {
|
||||
@@ -68,7 +67,7 @@ describe('AcaViewerComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, AcaViewerModule],
|
||||
imports: [LibTestingModule, AcaViewerComponent],
|
||||
providers: [
|
||||
{ provide: DocumentBasePageService, useValue: DocumentBasePageServiceMock },
|
||||
{ provide: DiscoveryApiService, useValue: discoveryApiServiceMockValue },
|
||||
|
@@ -25,6 +25,7 @@
|
||||
import {
|
||||
AppExtensionService,
|
||||
AppHookService,
|
||||
AppSettingsService,
|
||||
ContentApiService,
|
||||
InfoDrawerComponent,
|
||||
ToolbarComponent,
|
||||
@@ -45,18 +46,27 @@ import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
|
||||
import { Node, VersionEntry, VersionsApi } from '@alfresco/js-api';
|
||||
import { Component, HostListener, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router';
|
||||
import { AlfrescoApiService, AppConfigPipe, ViewerModule } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, ViewerOpenWithComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent } from '@alfresco/adf-core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { from, Observable, Subject } from 'rxjs';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import { Actions, ofType } from '@ngrx/effects';
|
||||
import { AlfrescoViewerModule, DocumentListService, NodesApiService, UploadService } from '@alfresco/adf-content-services';
|
||||
import { AlfrescoViewerComponent, DocumentListService, NodesApiService, UploadService } from '@alfresco/adf-content-services';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ViewerService } from '../../services/viewer.service';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent, AppConfigPipe],
|
||||
imports: [
|
||||
CommonModule,
|
||||
InfoDrawerComponent,
|
||||
ToolbarMenuItemComponent,
|
||||
ToolbarComponent,
|
||||
AlfrescoViewerComponent,
|
||||
ViewerToolbarActionsComponent,
|
||||
ViewerOpenWithComponent,
|
||||
ViewerSidebarComponent
|
||||
],
|
||||
selector: 'aca-viewer',
|
||||
templateUrl: './viewer.component.html',
|
||||
styleUrls: ['./viewer.component.scss'],
|
||||
@@ -64,6 +74,8 @@ import { ViewerService } from '../../services/viewer.service';
|
||||
host: { class: 'app-viewer' }
|
||||
})
|
||||
export class AcaViewerComponent implements OnInit, OnDestroy {
|
||||
settings = inject(AppSettingsService);
|
||||
|
||||
private documentListService = inject(DocumentListService);
|
||||
|
||||
private _versionsApi: VersionsApi;
|
||||
|
Reference in New Issue
Block a user