mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
migrate to adf debug app config
This commit is contained in:
@@ -28,7 +28,7 @@ import { NgModule } from '@angular/core';
|
|||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, PageTitleService } from '@alfresco/adf-core';
|
import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, PageTitleService, DebugAppConfigService } from '@alfresco/adf-core';
|
||||||
import { ContentModule } from '@alfresco/adf-content-services';
|
import { ContentModule } from '@alfresco/adf-content-services';
|
||||||
import { ElectronModule } from '@ngstack/electron';
|
import { ElectronModule } from '@ngstack/electron';
|
||||||
|
|
||||||
@@ -68,7 +68,6 @@ import { NodeActionsService } from './common/services/node-actions.service';
|
|||||||
import { NodePermissionService } from './common/services/node-permission.service';
|
import { NodePermissionService } from './common/services/node-permission.service';
|
||||||
import { SearchComponent } from './components/search/search.component';
|
import { SearchComponent } from './components/search/search.component';
|
||||||
import { SettingsComponent } from './components/settings/settings.component';
|
import { SettingsComponent } from './components/settings/settings.component';
|
||||||
import { HybridAppConfigService } from './common/services/hybrid-app-config.service';
|
|
||||||
import { PageTitleService as AcaPageTitleService } from './common/services/page-title.service';
|
import { PageTitleService as AcaPageTitleService } from './common/services/page-title.service';
|
||||||
import { ProfileResolver } from './common/services/profile.resolver';
|
import { ProfileResolver } from './common/services/profile.resolver';
|
||||||
|
|
||||||
@@ -137,7 +136,7 @@ import { MaterialModule } from './material.module';
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: PageTitleService, useClass: AcaPageTitleService },
|
{ provide: PageTitleService, useClass: AcaPageTitleService },
|
||||||
{ provide: AppConfigService, useClass: HybridAppConfigService },
|
{ provide: AppConfigService, useClass: DebugAppConfigService },
|
||||||
{
|
{
|
||||||
provide: TRANSLATION_PROVIDER,
|
provide: TRANSLATION_PROVIDER,
|
||||||
multi: true,
|
multi: true,
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { AppConfigService, StorageService } from '@alfresco/adf-core';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class HybridAppConfigService extends AppConfigService {
|
|
||||||
|
|
||||||
constructor(private storage: StorageService, http: HttpClient) {
|
|
||||||
super(http);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @override */
|
|
||||||
get<T>(key: string, defaultValue?: T): T {
|
|
||||||
if (key === 'ecmHost' || key === 'bpmHost') {
|
|
||||||
return <T> (<any> this.storage.getItem(key) || super.get<T>(key));
|
|
||||||
}
|
|
||||||
return super.get<T>(key, defaultValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user