2018-05-29 02:03:12 +08:00
|
|
|
import {SortingMethods} from '../../entities/SortingMethods';
|
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
export module ClientConfig {
|
|
|
|
export interface SearchConfig {
|
2018-05-13 00:19:51 +08:00
|
|
|
enabled: boolean;
|
|
|
|
instantSearchEnabled: boolean;
|
|
|
|
autocompleteEnabled: boolean;
|
2017-07-22 01:33:24 +08:00
|
|
|
InstantSearchTimeout: number;
|
2017-07-30 05:39:06 +08:00
|
|
|
autocompleteCacheTimeout: number;
|
2017-07-30 15:06:12 +08:00
|
|
|
instantSearchCacheTimeout: number;
|
|
|
|
searchCacheTimeout: number;
|
2017-07-15 18:47:11 +08:00
|
|
|
}
|
2016-05-11 03:33:58 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
export interface SharingConfig {
|
|
|
|
enabled: boolean;
|
|
|
|
passwordProtected: boolean;
|
|
|
|
}
|
2017-07-04 01:17:49 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
export interface MapConfig {
|
|
|
|
enabled: boolean;
|
|
|
|
googleApiKey: string;
|
|
|
|
}
|
2017-07-30 05:39:06 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
export interface ThumbnailConfig {
|
|
|
|
iconSize: number;
|
|
|
|
thumbnailSizes: Array<number>;
|
|
|
|
}
|
2017-07-14 05:39:09 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
export interface Config {
|
|
|
|
applicationTitle: string;
|
|
|
|
Thumbnail: ThumbnailConfig;
|
|
|
|
Search: SearchConfig;
|
|
|
|
Sharing: SharingConfig;
|
|
|
|
Map: MapConfig;
|
|
|
|
concurrentThumbnailGenerations: number;
|
|
|
|
enableCache: boolean;
|
|
|
|
enableOnScrollRendering: boolean;
|
|
|
|
enableOnScrollThumbnailPrioritising: boolean;
|
|
|
|
authenticationRequired: boolean;
|
|
|
|
publicUrl: string;
|
2018-05-13 00:19:51 +08:00
|
|
|
urlBase: string;
|
2017-12-25 07:42:25 +08:00
|
|
|
languages: string[];
|
2018-05-29 02:03:12 +08:00
|
|
|
defaultPhotoSortingMethod: SortingMethods;
|
2017-07-15 18:47:11 +08:00
|
|
|
}
|
2016-05-11 03:33:58 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
}
|
2017-07-30 05:39:06 +08:00
|
|
|
|
2017-06-04 21:25:08 +08:00
|
|
|
/**
|
|
|
|
* These configuration will be available at frontend and backend too
|
|
|
|
*/
|
|
|
|
export class PublicConfigClass {
|
2016-05-11 03:33:58 +08:00
|
|
|
|
2017-07-15 18:47:11 +08:00
|
|
|
public Client: ClientConfig.Config = {
|
2018-05-13 00:19:51 +08:00
|
|
|
applicationTitle: 'PiGallery 2',
|
2017-07-15 18:47:11 +08:00
|
|
|
Thumbnail: {
|
|
|
|
thumbnailSizes: [200, 400, 600],
|
|
|
|
iconSize: 30
|
|
|
|
},
|
2017-06-12 05:33:47 +08:00
|
|
|
Search: {
|
2017-07-14 05:39:09 +08:00
|
|
|
enabled: true,
|
2017-06-12 05:33:47 +08:00
|
|
|
instantSearchEnabled: true,
|
2017-07-22 01:33:24 +08:00
|
|
|
autocompleteEnabled: true,
|
2017-07-30 05:39:06 +08:00
|
|
|
InstantSearchTimeout: 3000,
|
2017-07-30 15:06:12 +08:00
|
|
|
autocompleteCacheTimeout: 1000 * 60 * 60,
|
|
|
|
searchCacheTimeout: 1000 * 60 * 60,
|
|
|
|
instantSearchCacheTimeout: 1000 * 60 * 60
|
2017-06-12 05:33:47 +08:00
|
|
|
},
|
2017-07-04 01:17:49 +08:00
|
|
|
Sharing: {
|
|
|
|
enabled: true,
|
|
|
|
passwordProtected: true
|
|
|
|
},
|
2017-07-14 05:39:09 +08:00
|
|
|
Map: {
|
|
|
|
enabled: true,
|
2018-05-13 00:19:51 +08:00
|
|
|
googleApiKey: ''
|
2017-07-14 05:39:09 +08:00
|
|
|
},
|
2017-06-12 05:33:47 +08:00
|
|
|
concurrentThumbnailGenerations: 1,
|
2017-07-19 16:21:52 +08:00
|
|
|
enableCache: true,
|
2017-06-12 05:33:47 +08:00
|
|
|
enableOnScrollRendering: true,
|
|
|
|
enableOnScrollThumbnailPrioritising: true,
|
|
|
|
authenticationRequired: true,
|
2018-05-13 00:19:51 +08:00
|
|
|
publicUrl: '',
|
|
|
|
urlBase: '',
|
2018-05-29 02:03:12 +08:00
|
|
|
languages: [],
|
|
|
|
defaultPhotoSortingMethod: SortingMethods.ascDate
|
2017-06-12 05:33:47 +08:00
|
|
|
};
|
2016-05-11 03:33:58 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|