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:
@@ -23,13 +23,20 @@
|
||||
*/
|
||||
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { AppConfigService, CloseButtonPosition } from '@alfresco/adf-core';
|
||||
import { AlfrescoMimeType, DefaultMimeTypes } from '../constants/mime-types';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AppSettingsService {
|
||||
private appConfig = inject(AppConfigService);
|
||||
|
||||
/**
|
||||
* Get the application copyright text from the app settings.
|
||||
*/
|
||||
get appCopyright(): string {
|
||||
return this.appConfig.get<string>('application.copyright', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the AOS (Alfresco Office Services) host URL from the app settings.
|
||||
*/
|
||||
@@ -98,6 +105,34 @@ export class AppSettingsService {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the viewer close button position from the app settings.
|
||||
*/
|
||||
get viewerCloseButtonPosition(): CloseButtonPosition {
|
||||
return this.appConfig.get('viewer.closeButtonPosition', CloseButtonPosition.Right);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the viewer max retries from the app settings.
|
||||
*/
|
||||
get viewerMaxRetries(): number {
|
||||
return this.appConfig.get<number>('viewer.maxRetries', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled state of the comment feature for upload dialog
|
||||
*/
|
||||
get uploadAllowComments(): boolean {
|
||||
return this.appConfig.get<boolean>('adf-version-manager.allowComments', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled state of the download feature for upload dialog
|
||||
*/
|
||||
get uploadAllowDownload(): boolean {
|
||||
return this.appConfig.get<boolean>('adf-version-manager.allowDownload', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the enablement of the file auto tryDownload feature from the app settings.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user