mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
2ea0ea42e3
upgrading packages
97 lines
2.2 KiB
TypeScript
97 lines
2.2 KiB
TypeScript
import {SortingMethods} from '../../entities/SortingMethods';
|
|
|
|
export module ClientConfig {
|
|
export interface SearchConfig {
|
|
enabled: boolean;
|
|
instantSearchEnabled: boolean;
|
|
autocompleteEnabled: boolean;
|
|
InstantSearchTimeout: number;
|
|
autocompleteCacheTimeout: number;
|
|
instantSearchCacheTimeout: number;
|
|
searchCacheTimeout: number;
|
|
}
|
|
|
|
export interface SharingConfig {
|
|
enabled: boolean;
|
|
passwordProtected: boolean;
|
|
}
|
|
|
|
export interface RandomPhotoConfig {
|
|
enabled: boolean;
|
|
}
|
|
|
|
export interface MapConfig {
|
|
enabled: boolean;
|
|
googleApiKey: string;
|
|
}
|
|
|
|
export interface ThumbnailConfig {
|
|
iconSize: number;
|
|
thumbnailSizes: Array<number>;
|
|
}
|
|
|
|
export interface Config {
|
|
applicationTitle: string;
|
|
Thumbnail: ThumbnailConfig;
|
|
Search: SearchConfig;
|
|
Sharing: SharingConfig;
|
|
Map: MapConfig;
|
|
RandomPhoto: RandomPhotoConfig;
|
|
concurrentThumbnailGenerations: number;
|
|
enableCache: boolean;
|
|
enableOnScrollRendering: boolean;
|
|
enableOnScrollThumbnailPrioritising: boolean;
|
|
authenticationRequired: boolean;
|
|
publicUrl: string;
|
|
urlBase: string;
|
|
languages: string[];
|
|
defaultPhotoSortingMethod: SortingMethods;
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* These configuration will be available at frontend and backend too
|
|
*/
|
|
export class PublicConfigClass {
|
|
|
|
public Client: ClientConfig.Config = {
|
|
applicationTitle: 'PiGallery 2',
|
|
Thumbnail: {
|
|
thumbnailSizes: [200, 400, 600],
|
|
iconSize: 30
|
|
},
|
|
Search: {
|
|
enabled: true,
|
|
instantSearchEnabled: true,
|
|
autocompleteEnabled: true,
|
|
InstantSearchTimeout: 3000,
|
|
autocompleteCacheTimeout: 1000 * 60 * 60,
|
|
searchCacheTimeout: 1000 * 60 * 60,
|
|
instantSearchCacheTimeout: 1000 * 60 * 60
|
|
},
|
|
Sharing: {
|
|
enabled: true,
|
|
passwordProtected: true
|
|
},
|
|
Map: {
|
|
enabled: true,
|
|
googleApiKey: ''
|
|
},
|
|
RandomPhoto: {
|
|
enabled: true
|
|
},
|
|
concurrentThumbnailGenerations: 1,
|
|
enableCache: true,
|
|
enableOnScrollRendering: true,
|
|
enableOnScrollThumbnailPrioritising: true,
|
|
authenticationRequired: true,
|
|
publicUrl: '',
|
|
urlBase: '',
|
|
languages: [],
|
|
defaultPhotoSortingMethod: SortingMethods.ascDate
|
|
};
|
|
|
|
}
|
|
|